AS Level · Topic 4.1
A-Level Computer Science 9618 / Topic 4 / AS

Four lines of notation.

Every instruction a processor runs starts with the same four register transfers. At AS Level you describe them in register transfer notation, a short and exact way of saying which value moves into which register. Learn to read it, write it and use it to trace an instruction.

The key idea

The fetch-execute (F-E) cycle is repeated for every instruction. In register transfer notation, [X] means the contents of X and ← means is copied into. The fetch stage is: MAR ← [PC]; PC ← [PC] + 1; MDR ← [[MAR]]; CIR ← [MDR]. The control unit then decodes the instruction in the CIR and it is executed, which may use memory again through the MAR and MDR and the ALU.

the fetch stage in register transfer notation MAR ← [PC] PC ← [PC] + 1 MDR ← [[MAR]] CIR ← [MDR] address of next instruction point to the following one contents of that address ready to decode [X] means the contents of X; ← means is copied into
Fig. 1: the four register transfers of the fetch stage
Section 01

Reading the notation.

Step through the cycle in the lab: each step shows its register transfer. The notation is compact, so read every bracket carefully.

NotationMeaning
MAR ← [PC]The contents of the PC (an address) are copied into the MAR.
PC ← [PC] + 1The PC is incremented, so it holds the address of the following instruction.
MDR ← [[MAR]]The contents of the memory location whose address is in the MAR are copied into the MDR. The double brackets mean "the contents of the address held in the MAR".
CIR ← [MDR]The instruction in the MDR is copied into the CIR, ready to be decoded.
Examiner trap

MDR ← [MAR] is wrong: it would copy the address itself. The instruction comes from the memory location the MAR points to, so it is MDR ← [[MAR]].

Section 02

Fetch, decode, execute.

Describe the cycle in full sentences when asked to "describe", and in notation when the question asks for register transfer notation. Both earn the same marks for the same steps.

  1. Fetch: the address in the PC is copied to the MAR. The address is sent along the address bus and a read signal along the control bus.
  2. The PC is incremented. (This can happen while the memory is being read.)
  3. The instruction at that address is sent along the data bus into the MDR, then copied to the CIR.
  4. Decode: the control unit decodes the instruction in the CIR into its opcode and operand.
  5. Execute: the CU sends control signals. If data is needed from memory, the operand address goes to the MAR and the data comes back into the MDR; the ALU does any arithmetic or logic and the result goes into the ACC. A jump instruction copies its address into the PC.
  6. The processor checks for interrupts, then the cycle repeats.
InstructionExecute stage in register transfer notation
LDD 150MAR ← 150; MDR ← [[MAR]]; ACC ← [MDR]
ADD 151MAR ← 151; MDR ← [[MAR]]; ACC ← [ACC] + [MDR]
JMP 120PC ← 120
Examiner trap

The PC is incremented in the fetch stage, not after the instruction has been executed. This is why a jump instruction simply overwrites the PC.

Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

What does MDR ← [[MAR]] mean?

Quick check+10 XP

In the lab, which transfer comes first in the fetch stage?

Quick check+10 XP

Which register holds the instruction while it is decoded?

Quick check+10 XP

What does PC ← [PC] + 1 do?

Section 03

Trace one instruction.

A common question gives you the PC and the contents of memory, then asks for the value in each register after a step. Work through the four fetch transfers in order, then the execute stage.

Worked example LDD 150
The PC holds 100. Address 100 holds the instruction LDD 150 and address 150 holds 37. Give the contents of the PC, MAR, MDR, CIR and ACC after the instruction has been executed.
  1. MAR ← [PC]: the MAR holds 100.
  2. PC ← [PC] + 1: the PC holds 101.
  3. MDR ← [[MAR]]: the MDR holds the instruction LDD 150. CIR ← [MDR]: the CIR holds LDD 150.
  4. Execute: the operand 150 is copied to the MAR, so the MAR holds 150. MDR ← [[MAR]]: the MDR holds 37.
  5. ACC ← [MDR]: the ACC holds 37.
Answer: PC 101, MAR 150, MDR 37, CIR LDD 150, ACC 37
Your turn
The next instruction, at address 101, is ADD #5. Give the contents of the PC, CIR and ACC after it has been executed. Is the MAR used in the execute stage?
Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS Paper 1 and Paper 2 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Which is the correct order of the fetch stage?

Exam style+20 XP

The PC holds 230 before an instruction is fetched. The instruction is JMP 300. What does the PC hold after it has been executed?

Exam style+20 XP

During the execute stage of ADD 151, which transfer adds the value from memory?

Exam style+20 XP

When are interrupts checked in the cycle?

Skill unlocked

The fetch-execute cycle in register transfer notation, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Each stage of the fetch-execute cycle in words and in register transfer notation, with registers traced through instructions.