Lec3 Chapter 3 PartOne
Lec3 Chapter 3 PartOne
ARCHITECTURE
Chapter 3
A Top-Level View Of Computer
Function and Interconnection
Overview
Part One
3.1 Components of a computer
3.2 Functions of a computer
Part Two
3.3 Interrupts
3.4. Buses
Part One
3.1 Components of a
Computer
Program Concept
Instruction format
Integer format
Figure 3.4 Characteristics of a Hypothetical Machine
Example of Program Execution
Internal CPU Registers
PC (Program Counter)
AC (Accumulator)
– a data register
IR (Instruction Register)
Program to be executed:
Adds the content of the
memory word at address
940 to the content of the
memory word address
941 and stores the result
in latter location.
Destination
Source
Mov x, z
Destination
Source
Str x, z
Source
Destination
(cont.) Example of Program
Execution
300 301
CPU
PC
Opcode Address 200
0100 300
200
IR
0110 301 Empty
201
0101 302
202 AC
Empty
4
300
8
301
302
(cont.) Example of Program
Execution
300 301
Opcode Address
Fetch
IR
300 4 0100 300
301 8
AC
302 Empty
(cont.) Example of Program
Execution
300 301
Opcode Address
Execute
IR
301 8 AC
302 4
(cont.) Example of Program
Execution
300 301 Opcode Address
0101 302 PC
202
201
Fetch
IR
300 4 0110 301
301 8
AC
302 4
(cont.) Example of Program
Execution
300 301
Opcode Address
IR
300 4
0100 301
301 8
302 AC
8
Execute
(cont.) Example of Program
Execution
300 301
Opcode Address
0101 302 PC
202 203
IR
300 4 0100 302
301 8
AC
302 12
Store
(cont.) Example of Program
Execution
Memory
Memory of Address
0 15
PC = No. of Instruction = 12 bits.
IR = Instruction Register = 16 bits.
AC = 16 bits.
MAR = 12 bits.
4095
MBR = 16 bits.
Input Register = 8 bits.
Output Register = 8 bits.
(cont.) Example of Program
Execution
1bits 12 bits
PC
0 12 bits 12
MBR
0 16 bits 15 Input
0 8 bits 7
MAR
0 12 bits 11 Output
0 8 bits 7
AC
0 16 bits 15
(cont.) Example of Program
Execution
0 31
Memory of Address
PC
0 18 bits 17
IR
0 32 bits 31 256k
MBR 32 bits
0 32 bits 31 Input
0 8 bits 7
MAR
0 18 bits 17 Output
0 8 bits 7
AC
0 32 bits 31
(cont.) Example of Program
Execution
1bits 6 bits 18 bits