Page 96 -
P. 96
3.2 / COMPUTER FUNCTION 71
0 3 4 15
Opcode Address
(a) Instruction format
0 1 15
Magnitude
(b) Integer format
Program counter (PC) Address of instruction
Instruction register (IR) Instruction being executed
Accumulator (AC) Temporary storage
(c) Internal CPU registers
0001 Load AC from memory
0010 Store AC to memory
0101 Add to AC from memory
(d) Partial list of opcodes
Figure 3.4 Characteristics of a Hypothetical Machine
Memory CPU registers Memory CPU registers
300 1940 300 PC 300 1940 301 PC
301 5941 AC 301 5941 0003 AC
302 2941 1940 IR 302 2941 1940 IR
• •
• •
940 0003 940 0003
941 0002 941 0002
Step 1 Step 2
Memory CPU registers Memory CPU registers
300 1940 301 PC 300 1940 302 PC
301 5941 0003 AC 301 5 9 4 1 1 0005 AC
302 2941 5941 IR 302 2941 5941 IR
• •
• •
940 0003 940 0003 3 2 5
941 0002 941 0002
Step 3 Step 4
Memory CPU registers Memory CPU registers
300 1940 30 2 PC 300 1940 303 PC
301 5941 0005 AC 301 5941 0005 AC
302 2941 2941 IR 302 2941 2941 IR
• •
• •
940 0003 940 0003
941 0002 941 0005
Step 5 Step 6
Figure 3.5 Example of Program Execution (contents of memory and
registers in hexadecimal)