GCSE · Computer Science · OCR · Spec J277

Fetch-execute cycle

A CPU can't just know what to do next. Every instruction is fetched, decoded, executed, then the whole thing starts again. Let's follow one.

Computer Science · The CPU

Follow one instruction all the way round

One instruction, LOAD 2, travelling from main memory to the accumulator. Each box is a register or a bus.

Before you start: what do you think tells the CPU which instruction to fetch next? Press Next and see.

Phase: Fetch

PC

3

MAR

—

MDR

—

CIR

—

Accumulator

—

Address bus

—

Data bus

—

Output

 

Step 1: The PC (program counter) holds the memory address of the next instruction the CPU needs to fetch. Here, that's address 3. (The PC is automatically increased by one, so it points to the next instruction in sequence. This walk-through keeps showing 3 and does not show the increase.) (The addresses and values in this walk-through are made up, so you can follow one instruction.)

1 / 13

Press Next, or Play. A lit box is holding or carrying something at that step; a dash means there is nothing to show yet.

Step 1 of 13: The PC (program counter) holds the memory address of the next instruction the CPU needs to fetch. Here, that's address 3. (The PC is automatically increased by one, so it points to the next instruction in sequence. This walk-through keeps showing 3 and does not show the increase.) (The addresses and values in this walk-through are made up, so you can follow one instruction.).

Computer Science · The PC

What does the PC hold?

The CPU is working through a program, one instruction after another.

What does the program counter (PC) hold?
How sure are you?

Computer Science · Registers

Which register does the job?

Pick a job, then pick the register that does it.

Still to sort

PC (program counter) (0)

MAR (memory address register) (0)

MDR (memory data register) (0)

CIR (current instruction register) (0)

Accumulator (0)

7 of 7 still to sort.

Computer Science · Fetch

Put the fetch transfers in order

Put the five transfer steps of the fetch stage in the order they happen.

1 · Happens first5 · Happens last
  1. MDR copied on to the CIR

  2. PC address copied to the MAR

  3. Instruction sent back on the data bus

  4. Address sent out on the address bus

  5. Instruction held in the MDR

Computer Science · Fetch

Describe it like you mean it

Describe what happens in the fetch stage of the cycle. Name the registers and buses used. [6 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How the CPU gets an instruction from memory, works out what it means, and carries it out.

What you need to know

  • Every instruction is fetched from main memory in order, decoded, then executed, and then the cycle starts again.
  • The program counter (PC) holds the memory address of the next instruction the CPU needs to fetch.
  • Have a goSuppose the PC holds the number 7. What does that 7 stand for?

    The memory address of the next instruction to fetch.

    The PC holds an address, not the instruction itself, and it points to the next instruction rather than the one being run.

  • In fetch, the PC's address is copied to the memory address register (MAR).
  • Next, the MAR sends the address along the address bus to main memory, which sends the instruction back along the data bus.
  • Have a goPretend the address bus is a delivery van and main memory is the house. Which register hands the address to the van?

    The MAR.

    It's tempting to say the PC, but the PC's address is first copied to the MAR, and the MAR is the one that sends it along the address bus.

  • It waits briefly in the memory data register (MDR), then is copied to the current instruction register (CIR).
  • Have a goTrue or false: the instruction goes straight from the data bus into the CIR.

    False. It waits in the MDR first.

    The MDR holds the instruction temporarily, and only then is it copied to the CIR.

  • The PC is automatically increased by one, so it points to the next instruction in sequence.
  • Have a goA fetch starts with the PC holding 12. What will the PC hold once it has been increased?

    13.

    It is automatically increased by one so it points to the next instruction in sequence, not back at the one just fetched.

  • Decode: the control unit decodes the CIR's instruction from binary; it can only run instructions that have been fetched and decoded.
  • Execute: the MAR takes the address from the decoded instruction, and the data comes back along the data bus.
  • For LOAD 2, the data updates the MDR, then goes to the accumulator, which stores results and holds data produced.
  • A bus carries data, addresses and instructions from one component to another, here between the CPU and main memory.

The big picture

The fetch-execute cycle is how the CPU runs instructions: it fetches an instruction from main memory, decodes it, executes it, then starts again. The program counter holds the address of the next instruction, and registers and buses carry each instruction and its data between the CPU and main memory.

Key points

1Fetch, decode, execute, then the cycle starts again.
2The PC holds the address of the next instruction, not the instruction itself.
3Fetch: the address goes PC to MAR to main memory along the address bus, and the instruction comes back along the data bus to the MDR, then the CIR.
4Decode: the control unit decodes the instruction in the CIR from binary. Execute: it is carried out, and for LOAD 2 the data ends up in the accumulator.
5Buses carry data, addresses and instructions between the CPU and main memory.

Worked example

Problem

Try a new one. LOAD 5 is stored at address 8, and the number 20 is stored at address 5. The PC holds 8 as the fetch stage starts. What do the PC, MAR, MDR and accumulator hold when LOAD 5 has finished executing?

⚠ Watch out

Mixing up the MAR and the MDR. The MAR holds an address and sends it along the address bus. The MDR temporarily holds what comes back from memory along the data bus.

🧠

Memory hook

The PC points ahead, the MAR asks, the MDR waits, the CIR gets decoded, and the accumulator keeps the answer.

✓

Check yourself

In your own words: why can't the control unit run an instruction the moment it has been fetched, and which register is it decoded from?

Flashcards

(14)
What are the stages of the fetch-execute cycle?
Fetch, decode and execute. Then the cycle starts again.
What does the program counter (PC) hold?
The memory address of the next instruction the CPU needs to fetch.
What happens automatically to the PC?
It is automatically increased by one, so it points to the next instruction in sequence.
What does the memory address register (MAR) hold in the fetch stage?
The address copied to it from the PC.
What travels along the address bus in fetch?
The address, from the MAR to main memory.
Which bus brings the instruction back from main memory?
The data bus.
What is the memory data register (MDR) for?
It temporarily holds what memory sends back. In fetch, that's the instruction, before it is copied to the CIR.
Which register does the control unit decode an instruction from?
The current instruction register (CIR).
What form is an instruction in before it is decoded?
Its binary representation.
What rule does the control unit follow about running instructions?
It can only run instructions that have been fetched and decoded.
What is the MAR updated with in the execute stage?
The address from the decoded instruction.
In the LOAD 2 example, where does the data go after the data bus?
It updates the MDR, and is then stored in the accumulator.
What is a bus?
A way of carrying data, addresses and instructions from one component to another.
What is the accumulator?
A register in the CPU that stores the results of calculations and holds any data that is produced.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.