Main Memory |
Address | Contents |
0000 | 00101011 |
0001 |
10001110 |
0010 | 10101001 |
0011 | 00000000 |
0100 | 10001011 |
0101 | 00011000 |
0110 | 11111111 |
0111 | 01100010 |
1000 | 00101000 |
1001 | 11110000 |
1010 | 10101011 |
1011 | 10111100 |
1100 | 11010000 |
1101 | 01000111 |
1110 | 00001100 |
1111 | 10001001 |
|
CPU |
|
|
Program Counter |
0001 |
Instruction Register | 01001011 |
Accumulator | 00001110 |
Instruction Decoder |
|
|
Add Circuit |
Subtract Circuit |
Compare to Zero Circuit |
etc... |
|
|
Step 1: The Control Unit fetches the next instruction
from main memory. It does this as follows:
- it looks in the Program Counter
for the address of the instruction (in this example, the address is
0001, highlighted in light green), then
- it goes to that address and brings the contents of
that memory location (highlighted in light blue) into the Instruction
Register. (Note that the 0s and 1s you currently see in the Instruction
Register would be the last instruction that was executed.)
- it adds one to the Program Counter (so the new value will
be the address of the
next sequential memory location which will usually contain the next
instruction to be executed)
Click here to see the result of step 1.
|