ITCS 222 Computer Organization Assignment
WE WRITE ESSAYS FOR STUDENTS
Tell us about your assignment and we will find the best writer for your project
Write My Essay For MeIntroduction
Dr. Abdul Fattah Salman
ITCS 222: Computer Organization
University of Bahrain
College of Information Technology
Department of Computer Science
ITCS 222: Computer Organization
These slides are based on slides of Prof.
Muhamed Mudawar (KFUPM) and modified
by Dr. Abdul Fattah Salman
ITCS 222– Computer Organization slide #3 Introduction
Which Textbook will be Used?
• Textbooks
• David A. Patterson and John L. Hennessy,
Computer Organization & Design, The
Hardware/Software Interface, Fifth Edition,
Morgan Kaufmann Publishers, 2013.
• Read the textbook in addition to slides
ITCS 222 Computer Organization Assignment
ITCS 222– Computer Organization slide #4 Introduction
Software Tools used in this Course
• CPU Design and Simulation Tool
Logisim
Educational tool for designing and simulating CPUs
Website: http://ozark.hendrix.edu/~burch/logisim/
• MIPS Simulators
MARS: MIPS Assembly and Runtime Simulator
Runs MIPS-32 assembly language programs
Website: http://courses.missouristate.edu/KenVollmar/MARS/
SPIM (Optional)
Also Runs MIPS-32 assembly language programs
Website: http://www.cs.wisc.edu/~larus/spim.html
ITCS 222– Computer Organization slide #5 Introduction
What you will Learn in this Course?
On successful completion of the course, students will be able to:
• Demonstrate understanding of how various kinds of data are
represented and how basic operations are performed.
• Analyze and Design of combinational and sequential logic circuits.
• Demonstrate understanding of the basics of the instruction set
architecture of MIPS processors.
ITCS 222 Computer Organization Assignment
• Analyze, develop, modify, and test MIPS assembly programs of
various complexities.
• Design of datapath and control of single- and multi-cycle processors
• Analyze and critically evaluate the performance of processors.
• Apply debugging tools and techniques to experiment with various
instructions and programs.
ITCS 222– Computer Organization slide #6 Introduction
Analog and Digital Signals & Systems
• Analog means continuous; Digital means discrete using numerical digits
• Analog signals have continuous range of values
Temperature is an example of an analog signal that increases/decreases
continuously like a continuous mathematical function, No discontinuity points
• Digital signals have fixed set of discrete values such as month number {1,
2, 3, …, 12} and cannot be 1.5!
• Are computers analog or digital systems?
Today’s computers are digital systems
• Which is easier to design an analog or a digital system?
Digital systems are easier to design, because they deal with a limited set of
values rather than an infinitely large range of continuous values
• The world around us is analog
• It is common to convert analog signals into digital form
• This process is called digitization
ITCS 222– Computer Organization slide #7 Introduction
Digitization of Analog Signals
• Digitization is the process of converting an analog signal into digital
form
Example: consider digitizing an analog voltage signal
Assume digitized output is limited to four values = {V1,V2,V3,V4}
Voltage
Time
ITCS 222– Computer Organization slide #8 Introduction
Digitization of Analog Signals – cont’d
• Some loss of accuracy, why?
• How to improve accuracy?
Voltage
Time
Voltage
Time
ITCS 222 Computer Organization Assignment
Add more voltage values
ITCS 222– Computer Organization slide #9 Introduction
ADC and DAC Converters
• Analog-to-Digital Converter (ADC)
Produces digitized version of analog signals
Analog input => Digital output
• Digital-to-Analog Converter (DAC)
Regenerate analog signal from digital form
Digital input => Analog output
• Our focus is on digital systems only
Both input and output to a digital system are digital signals
Analog-to-Digital
Converter (ADC)
Digital-to-Analog
Converter (DAC)
Digital System
input digital
signals
output digital
signals
input analog
signals
output analog
signals
ITCS 222– Computer Organization slide #10 Introduction
How do Computers represent Digits?
• Binary digits (BITS: 0 and 1) are the simplest to represent
• In digital systems, bits are physically represented using 4 ways:
1) Using electric voltage
Used in processors and digital circuits
High voltage = 1, Low voltage = 0
2) Using electric charge
Used in main memory cells
Charged main memory cell = 1, discharged memory cell = 0
3) Using magnetic field
Used in magnetic disks, magnetic polarity indicates 1 or 0
4) Using light
Used in optical disks, optical lens can sense the light or not
High = 1
Low = 0
Unused
Voltage Level
ITCS 222– Computer Organization slide #11 Introduction
A Hierarchy of Programming Languages
Application Programs
High-Level Languages
Assembly Language
Machine Language
Hardware
High-Level Language
Low-Level Language
Machine independent
Machine specific
• What is Assembly Language?
• What is Machine Language?
• How is Assembly related to a
high-level language?
• Why Learn Assembly Language?
• What is an Assembler, Linker,
and Debugger?
ITCS 222– Computer Organization slide #12 Introduction
Assembly and Machine Languages
• Machine language
Native to a processor: executed directly by hardware
A machine program is composed of instructions consisting of binary code of 1s and 0s
• Assembly language
Slightly higher-level language
A program is composed of instructions consisting of Arabic digits and abbreviations of
English language
Readability/Understandibility of Assembly programs is better than machine programs
Assembly instructions have one-to-one correspondence with machine instructions
Assembly programs can’t be executed directly and need to be translated into machine
programs by a special program called Assembler.
• High-level language (HLL)
An HLL program is composed of statements consisting of English language phrases
HLL programs can’t be executed directly and need to be translated into machine
programs by a special program called Compiler either directly, or indirectly via an
assembler
ITCS 222– Computer Organization slide #13 Introduction
Compiler and Assembler
ITCS 222– Computer Organization slide #14 Introduction
MIPS Assembly Language:
sll $2,$5, 2
add $2,$4,$2
lw $15,0($2)
lw $16,4($2)
sw $16,0($2)
sw $15,4($2)
jr $31
Compiler
Translating Languages
// Program (C Language):
swap(int v[], int k) {
int temp;
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
}
A statement in a high-level
language is translated
typically into several
machine-level instructions
MIPS Machine Language:
00051080
00821020
8C620000
8CF20004
ACF20000
AC620004
03E00008
Assembler
ITCS 222– Computer Organization slide #15 Introduction
Advantages of High-Level Languages
1) Program development in HLLs is easier and faster than in
Assembly or Machine languages
HLL programs are easy and simple to learn and understand
High-level statements are powerful and compact.
2) Program maintenance in HLL is easier than in Assembly or
Machine languages
For the same above reasons
3) HLL programs are portable while Assembly or Machine programs
are not portable
Contain few machine-dependent details
Can be used on different machines with little or no modifications
Assembly language programs are machine-dependable and not portable and
need an Assembler to translate to the target machine language
ITCS 222– Computer Organization slide #16 Introduction
Why Learn Assembly Language?
• Many reasons:
Space and time efficiency: Assembly programs occupy less memory space
and execute faster than equivalent programs written in HLLs.
Assembly language provides accessibility to system hardware
Assembly language is usually needed for writing low-level tasks in system
software such as device drivers, compilers and operating systems
Assembly language also useful for small embedded system applications
• Programming and maintenance of programs written in Assembly
Language is harder and more time-consuming than in HLL
Requires deep understanding of the processor architecture (hardware)
However, it is very rewarding to system software designers
Adds a new perspective on how programs run on real processors
ITCS 222– Computer Organization slide #17 Introduction
Assembly Language Development Tools
• Text editor
Allows you to create and edit assembly language source programs (files)
• Assembler
Converts assembly language (source) programs into machine (object)
programs consisting of machine instructions
• Linker
Combines object programs created by the assembler with link libraries
and produces a single executable program
• Debugger
Allows you to trace (single-step) the execution of machine program
Allows you to view machine instructions, edit registers and memory
ITCS 222– Computer Organization slide #18 Introduction
Assemble and Link Process
Source
File
Source
File
Source
File
Assembler
Object
File
Assembler
Object
File
Assembler
Object
File
Linker Executable
File
Link
Libraries
A program may consist of multiple source files
Assembler translates each source file into an object file
Linker combines (links) all object files together and with link
libraries
The resulting executable file can run directly on the processor
ITCS 222– Computer Organization slide #19 Introduction
Main Components and functions of MARS Software
• MARS is a complete system for developing MIPS Assembly programs
that consists of: Text editor, Assembler, and Debugger.
• Text editor with color-coded assembly syntax
Allows you to create and edit assembly language source files
• Assembler
Converts MIPS assembly language programs into object files
• Console and file input/output using system calls
• Debugger
Simulates the execution of programs
Allows you to trace the execution of a program and set breakpoints
Allows you to view machine instructions, edit registers and memory
ITCS 222– Computer Organization slide #20 Introduction
MARS Assembler and Simulator Tool
ITCS 222– Computer Organization slide #21 Introduction
Main Features of Logisim Tool
• A software tool for designing and simulating digital logic circuits.
• Logisim is simple enough to facilitate learning the most basic concepts related
to logic circuits
• Logisim can be used to design and simulate entire digital systems such as
CPUs for educational purposes.
• Color-coded wires aid in simulating and debugging a circuit.
• Completed circuits can be saved into a file, exported to a GIF file, or printed
on a printer.
• Circuit layouts can be used as “subcircuits” of other circuits, allowing for
hierarchical circuit design.
• Included built-in circuit components with inputs and outputs: gates,
multiplexers, arithmetic circuits, flip-flops, and RAM memory.
• The included “combinational analysis” module allows for conversion between
circuits, truth tables, and Boolean expressions.
ITCS 222– Computer Organization slide #22 Introduction
Screen shot of Logisim
ITCS 222– Computer Organization slide #23 Introduction
Components of a Computer System
• Processor
Datapath and Control
• Memory & Storage
Main Memory
Disk Storage
• Input/Output devices
User-interface devices
Network adapters
For communicating with other computers
• Bus: Interconnects processor to memory and I/O
• Essentially the same components for all kinds of computers
Computer
Memory
I/O Devices
Input
Output
B
U
S
Control
Datapath
Processor
Disk
Network
ITCS 222– Computer Organization slide #24 Introduction
1) Fetch instruction & Compute
address of next instruction
2) Generate control signals for defining
operation in the fetched instruction and
reading the operands from registers
3) Perform the specified operation
and compute the result
5) Write back result in a register
Fetch – Decode – Execute Cycle
Instruction Decode
Instruction Fetch
Execute
Writeback Result
Infinite Cycle implemented in Hardware
Memory Access 4) Read or write memory
ITCS 222– Computer Organization slide #25 Introduction
Programmer’s View of a Computer System
Application Programs
High-Level Language
Assembly Language
Operating System
Instruction Set
Architecture
Microarchitecture
Physical Design Level 0
Level 1
Level 2
Level 3
Level 4
Level 5 Increased level
of abstraction
Each level hides
the details of the
level below it
Software
(computer
scientists)
Hardware
(computer
& Electronic
engineers)
Interface
SW & HW
ITCS 222– Computer Organization slide #26 Introduction
Programmer’s View (cont’d)
• Application Programs (Level 5)
Written in high-level programming languages
Such as Java, C++, Python, Pascal, Visual Basic . . .
Programs compile into Assembly language level (Level 4)
• Assembly Language (Level 4)
Instruction mnemonics (symbols) are used
Have one-to-one correspondence to machine language
Calls functions written at the operating system level (Level 3)
Programs are translated into machine language (Level 2)
• Operating System (Level 3)
Provides services to level 4 and 5 programs
Translated to run at the machine instruction level (Level 2)
ITCS 222– Computer Organization slide #27 Introduction
Programmer’s View (cont’d)
• Instruction Set Architecture (Level 2)
Interface between software and hardware
Specifies how a processor operates
Machine instructions, registers, and memory are exposed
Machine language is executed by Level 1 (microarchitecture)
• Microarchitecture (Level 1)
Controls the execution of machine instructions (Level 2)
Implemented by digital logic
• Physical Design (Level 0)
Implements the microarchitecture at the transistor-level
Physical layout of circuits on a chip
ITCS 222– Computer Organization slide #28 Introduction
Memory and Storage Devices
• Volatile Memory Devices
RAM = Random Access Memory
DRAM = Dynamic RAM
Dense but must be refreshed (typical choice for main memory)
SRAM: Static RAM
Faster but less dense than DRAM (typical choice for cache memory)
• Non-Volatile Storage Devices
Magnetic Disk
Flash Memory (Solid State Disk)
Optical Disk (CDROM, DVD)
ITCS 222– Computer Organization slide #29 Introduction
Units for Storage and Memory
Size of disk storage
Value = 10n (base 10)
Size of memory
Value = 2n (base 2)
The binary terms are used to avoid the confusion with the
commonly used decimal terms. The size of memory is 2n because
the memory address is an n-bit binary number.
ITCS 222– Computer Organization slide #30 Introduction
Technology Trends
• Electronic Technology continues to improve
Increased capacity
Performance
Reduced cost
• DRAM capacity
4X every 3 years
Slowed down to 2X
Year Technology Relative performance/cost
1951 Vacuum tube 1
1965 Transistor 35
1975 Integrated circuit (IC) 900
1995 Very large scale IC (VLSI) 2,400,000
2013 Ultra large scale IC 250,000,000,000
DRAM capacity
ITCS 222– Computer Organization slide #31 Introduction
Clock
Operation of a digital system is governed by a clock
Clock period: duration in seconds of a clock cycle
• e.g., 250 ps = 250 ×10–12 sec = 0.25 ns = 0.25 ×10–9 sec
Clock frequency (rate) = 1 / clock period
• e.g., 1/ (0.25 ×10–9 ) sec = 4.0×109 Hz = 4.0 GHz
Clock (cycles)
Data transfer
and computation
Update state
Clock period
ITCS 222 Computer Organization Assignment ESSAY
Write my Essay. Premium essay writing services is the ideal place for homework help or essay writing service. if you are looking for affordable, high quality & non-plagiarized papers, click on the button below to place your order. Provide us with the instructions and one of our writers will deliver a unique, no plagiarism, and professional paper.
Get help with your toughest assignments and get them solved by a Reliable Custom Papers Writing Company. Save time, money and get quality papers. Buying an excellent plagiarism-free paper is a piece of cake!
All our papers are written from scratch. We can cover any assignment/essay in your field of study.