GCSE · Computer Science · Edexcel · Spec 1CP2

Fetch-decode-execute cycle

Your CPU does just three things, billions of times a second: fetch, decode, execute. Rebuild the loop, then break it, to see why every stage earns its place.

Computer Science · The processor

Rebuild the cycle, then break it

2 stages are missing. Use the rest of the loop to work out which goes where.

  1. Stage 1: Fetch 1: PC address to MAR

    The program counter holds the address of the next instruction. That address is copied to the memory address register, ready to go to main memory.

  2. Stage 2: Fetch 2: instruction into MDR, then CIR

    Memory sends the instruction back to the CPU. It lands in the memory data register, then is copied to the current instruction register.

  3. Stage 5: Execute

    The control unit tells the other components what they need to do, and the instruction is carried out. Then the cycle goes back to fetch.

…and stage 5 leads back to stage 1.

Computer Science · Inside the CPU

Follow one instruction, register by register

The ring showed the shape of the cycle. Now zoom in. The Bus column shows what is travelling between the CPU and main memory. The addresses and values are invented, just to make the trace concrete.

Before you step on: while the control unit is decoding, which register will be holding the instruction?

Phase: Fetch 1: PC address copied to MAR

PC

5

MAR

5

MDR

—

CIR

—

ACC

—

Bus

—

Output

 

Step 1: The PC holds 5, the address of the next instruction. That address is copied to the MAR.

1 / 9

Press Next to step through. Keep your eye on the PC and the Bus column.

Step 1 of 9: The PC holds 5, the address of the next instruction. That address is copied to the MAR..

Computer Science · Registers

Which register does which job?

Pick a register, then pick the job it does. Registers are very small, fast memory locations in the processor, and each has its own function.

Still to sort

Address of the next instruction (0)

Where the CPU will fetch from next.

Where the line is: The MAR also holds an address, but the PC's address is for the next fetch, while the MAR's is the one being sent to memory.

Address being sent to memory (0)

The address that goes along the address bus.

Where the line is: It holds an address, never the instruction or data that comes back.

What has just arrived from memory (0)

Instructions and data come in here first.

Where the line is: The CIR also holds an instruction, but the MDR is where it arrives, and loaded data passes through the MDR too.

The instruction being decoded and executed (0)

The control unit takes the instruction from here.

Where the line is: Only instructions are copied here, not data.

Results of calculations (and loaded data) (0)

Where produced data is stored.

Where the line is: Data that is produced or loaded goes here, not into the CIR.

5 of 5 still to sort.

Predict, then check

Ask yourself: is this thing an instruction, or is it data?

A LOAD instruction is being executed. The data has come back from main memory along the data bus and is sitting in the MDR. Where does it go next?

Computer Science · Two tempting ideas

Which idea is closest to yours?

Three students are explaining what the CPU does while a program runs.

Which one is closest to what you think right now?
How sure are you?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Three jobs, repeated billions of times a second: that loop is every program you run.

What you need to know

  • Instructions are loaded into main memory (RAM) first. Then each is fetched, decoded and executed in turn, and the cycle repeats.
  • Registers are very small, fast memory locations inside the processor, each with its own job.
  • The program counter (PC) holds the memory address of the next instruction. It is an address, not a count.
  • Fetch: the PC's address is copied to the MAR, then sent along the address bus to main memory.
  • Have a goThe address in the MAR needs to reach main memory. Which bus does it travel along?

    The address bus.

    The fetch is sending an address out to memory, so it goes on the address bus. The instruction comes back on a different bus.

  • The instruction comes back along the data bus into the MDR, then is copied to the CIR.
  • The PC is then increased by one, so it points to the next instruction in sequence.
  • Have a goThe PC holds 7 and the fetch has just finished. What does the PC hold now?

    8

    The PC is increased by one during fetch so it points at the next instruction. It's an address moving on, not a tally of instructions run.

  • Decode: the control unit decodes the binary instruction in the CIR. It can only run instructions that are fetched and decoded.
  • Have a goSam says: 'The control unit can run an instruction the moment it lands in the CIR. Decoding is just a formality.' What do you say to Sam?

    It can only run instructions that have been fetched and decoded.

    The instruction sits in the CIR in binary. Without decoding, the control unit has no way to work out what the other components need to do.

  • Execute: the control unit tells the other components what they need to do.
  • The accumulator stores results of calculations. Loaded data goes MDR to accumulator, not CIR, because it isn't an instruction.
  • The cycle repeats billions of times a second. The CPU clock regulates how many, and synchronises the other components.

The big picture

The CPU runs a program by repeating one cycle: fetch an instruction from main memory, decode it, execute it, then go round again. Registers hold the addresses, instructions and data on the way, and buses carry them between the CPU and main memory.

Key points

1Fetch: PC address to MAR, along the address bus to memory; the instruction returns on the data bus to the MDR, then the CIR; the PC is increased by one.
2Decode: the control unit decodes the binary instruction held in the CIR, and only fetched and decoded instructions can be run.
3Execute: the control unit tells the other components what to do. For a load, the data goes via the MDR into the accumulator.
4The PC holds an address, not a count, and the CPU does not understand instructions: it fetches, decodes and executes them.

Worked example

Problem

A student traces a fetch that starts with the PC holding 12, where the instruction at address 12 is LOAD 6. Their finished trace shows PC = 12, MAR = 12, MDR = LOAD 6, CIR = LOAD 6. One step is missing. Which, and what goes wrong next?

⚠ Watch out

Thinking the PC counts instructions that have run, or that the CPU understands them. The PC holds the address of the next instruction; the CPU just fetches, decodes and executes what it receives.

🧠

Memory hook

Think of the PC as a sat-nav: it holds where to go next, not how far you've already driven. Fetch it, decode it, execute it, then round again.

✓

Check yourself

Cover the page. Say the fetch stage out loud: which registers does the address and the instruction pass through, in order, and which bus carries each one?

Flashcards

(13)
Before a program runs, where are its instructions?
They are loaded into main memory (RAM) before the processor starts running the program.
What three steps make up each cycle?
Fetch, decode and execute. Then the cycle repeats.
What is a register?
A very small, fast memory location in the processor, with its own function.
What does the program counter (PC) hold?
The memory address of the next instruction the CPU needs to fetch.
What does the memory address register (MAR) do?
It receives the address (copied from the PC during fetch) and sends it along the address bus to main memory.
What does the memory data register (MDR) hold?
What has just arrived from memory on the data bus: an instruction during fetch, or data during a load.
What does the current instruction register (CIR) hold?
The instruction the control unit takes in order to decode it and then execute it.
What is stored in the accumulator?
The results of calculations (any data that is produced), and data loaded from memory.
Which bus carries an address, and which carries the instruction back?
The address bus carries the address to main memory. The data bus carries the instruction (or data) back to the CPU.
What does the control unit do in the decode stage?
It decodes the instruction from its binary representation, to work out what the other components need to do.
Which instructions can the control unit run?
Only instructions that have been fetched and decoded.
What does the CPU clock do?
It regulates the number of cycles carried out per second and synchronises the other components.
Does the CPU understand instructions like a person does?
No. An instruction is fetched, decoded and executed, and the process only executes the instructions it receives.

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 Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)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 21 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.