Chapter 3 - 1
Chapter 3 - 1
Computer Organization
and Architecture
Chapter 3
Top Level View of Computer
Function and Interconnection
Top Level View of Computer Function and
Interconnection
Hardwired System
• Assuming that we have a small set of basic logic components that
can be combined in various ways to store binary data and perform
arithmetic and logical operations on that data
• If there is a particular computation to be performed, a configuration
of logic components designed specifically for that computation
could be constructed
• This technique is called hardwired system
• It is a customized hardware that accepts data and produces results
Program Concept
Hardwired program
A B C A B C
Adder
Compute
A+B-C
Subtractor
Special purpose
hardware
Program Concept
Software System
Constitute CPU
But Several other
components are needed
to yield a functioning
computer
What is a program?
❑ A sequence of steps
❑ For each step, an arithmetic or logical operation is done
❑ For each operation, a different set of control signals is
needed
Components
❑ The Control Unit and the Arithmetic and Logic Unit
constitute the Central Processing Unit
❑ Data and instructions need to get into the system and
results out
✔ Input/output
❑ Temporary storage of code and results is needed
✔ Main memory Location
Memory
123 0
Word length = n
710 1
Memory Controller
Data Bus n-bits
200 2
m
-50 3
Memory size = 2 4
123
Address Bus m-bits 710 5
Read 200 6
Control Bus Write -50 7
Components
❑ The Control Unit and the Arithmetic and Logic Unit
constitute the Central Processing Unit
❑ Data and instructions need to get into the system and
results out
✔ Input/output
❑ Temporary storage of code and results is needed
✔ Main memory Location
Memory
123 0
710 1
Memory Controller
Data Bus
Read 200 2
Location -50 3
3 123 4
Address Bus 3 5
710
Read 200 6
Write -50 7
Components
❑ The Control Unit and the Arithmetic and Logic Unit
constitute the Central Processing Unit
❑ Data and instructions need to get into the system and
results out
✔ Input/output
❑ Temporary storage of code and results is needed
✔ Main memory Location
Memory
123 0
710 1
Memory Controller
Data Bus
Read 200 2
Location -50 3
6 123 4
Address Bus 6 5
710
Read 200 6
Write -50 7
Components
❑ The Control Unit and the Arithmetic and Logic Unit
constitute the Central Processing Unit
❑ Data and instructions need to get into the system and
results out
✔ Input/output
❑ Temporary storage of code and results is needed
✔ Main memory Location
Memory
123 0
710 1
Memory Controller
Data Bus 35
200 2
Write 35 to
-50 3
Location 5
123 4
Address Bus 5 710
35 5
Read 200 6
Write -50 7
Computer Components: Top Level View
CPU
Main Memory
PC MAR System Instruction 0
MBR
BUS Instruction 1
IR
Instruction 2
I/O .
Execution AR .
Unit
I/O
BR .
Data
I/O Module Data
Buffers
Data
n-2
n-1
Computer Components: Top Level View
❑ Memory Address Register (MAR), specifies the address in
memory for the next read or write
❑ Memory Buffer Register (MBR), contains the data to be
written into memory or receives data read from memory
❑ Similarly, an I/O address register (I/O AR) specifies a
particular I/O device
❑ Memory module consists of a set of locations, defined by
sequentially numbered addresses
❑ Each location contains a binary number that can be
interpreted as either an instruction or data
❑ I/O buffer register (I/O BR) is used for the exchange of data
between an I/O module and the CPU
❑ An I/O module transfers data from external devices to CPU
and memory, and vice versa
❑ I/O module contains internal buffers for temporarily holding
these data until they can be sent on
Instruction Cycle
❑ Two steps:
Fetch
Execute
❑ Processor-memory
Data transfer between CPU and main memory
❑ Processor I/O
Data transfer between CPU and I/O module
❑ Data processing
Some arithmetic or logical operation on data
❑ Control
Altering the execution sequence
e.g. jump
❑ Combination of above
Example of Program Execution
Hypothetical machine
❑ The processor contains a single data register, called an
accumulator (AC)
❑ Both instructions and data are 16 bits long
❑ Thus, it is convenient to organize memory using 16-bit words
❑ The instruction format provides 4 bits for the opcode, so that
there can be as many as 24 = 16 different opcodes and
❑ up to 212 = 4096 (4K) words of memory can be addressed
0001 load AC from memory LDA {address}
0010 store AC to memory
0101 add to AC from STA {address}
memory
ADA {address} Instruction
15 12 11 0
0010 100101000000
Op-Code Address
STA {940} 2 9 4 0
Example of Program Execution
Fetch
Memory Program CPU Registers
300 1940 LDA {940} 300 PC
301 5941 ADA {941} AC
302 2941 STA {941} IR
940 0003
941 0002
940 0003
941 0002
940 0003
941 0002
940 0003
941 0002
940 0003
941 0002
0005
Multiple Multiple
operands Results