Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
At the start of a cycle the program counter holds 40. Address 40 holds the instruction LOAD 55, and address 55 holds the value 18.
Find the value in the PC at the end of the fetch stage. Then find the value in the MAR during the execute stage, and the value in the ACC at the end of the cycle.
Fetch: the PC is copied to the MAR and the address goes along the address bus. The instruction comes back along the data bus to the MDR. It is copied to the CIR and the PC is incremented. Decode: the CU decodes the instruction in the CIR. Execute: the instruction is carried out. The MAR and MDR are used for any data, the ALU for any calculation and the ACC for the result.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Fetch. The PC value is copied to the MAR. The instruction LOAD 55 comes along the data bus to the MDR and is copied to the CIR. The PC is incremented to .
Step 2. Decode. The control unit finds that it must load the value at address 55.
Step 3. Execute. The address is put into the MAR. The value comes along the data bus to the MDR, and it is copied into the ACC.
Answer: the PC holds 41, the MAR holds 55 in the execute stage, and the ACC holds 18.
Watch out. In this one cycle the MAR held 40 and then 55. It always holds the address that is about to be used.
Log in to join the discussion.
Loading…