GCSE · Computer Science · AQA · Spec 8525

Fetch-Execute cycle

Every app you have ever used comes down to one tiny loop: get an instruction, work out what it is, do it. Then do it again. And again.

Computer Science · The CPU

Watch one program run

Mem 0 to Mem 4 are boxes in main memory. The last two boxes are inside the CPU.

Before you press Next, make a guess: which step will change a box in main memory? Keep it in your head and find out.

Phase: Start

Mem 0

LOAD Mem 3

Mem 1

ADD 5

Mem 2

STORE Mem 4

Mem 3

10

Mem 4

0

Instruction in CPU

empty

Value in CPU

empty

Output

 

Step 1: The program (Mem 0 to Mem 2) and its data (Mem 3 and Mem 4) are in main memory. The CPU hasn't started yet.

1 / 10

Press Next one phase at a time. Every value here is set by the lesson, not run by the page.

Step 1 of 10: The program (Mem 0 to Mem 2) and its data (Mem 3 and Mem 4) are in main memory. The CPU hasn't started yet..

Watch out: Fetch copies the instruction. Look at Mem 0 after the first fetch: LOAD Mem 3 is still there.

Computer Science · The CPU

Which stage is it?

Put each action in the stage it belongs to. Careful: three of them read main memory, and they don't all belong to the same stage.

Still to sort

Fetch (0)

Getting the next instruction into the CPU

Where the line is: Fetch reads main memory to get an instruction. If the CPU reads memory for a number an instruction asked for, that's execute.

Decode (0)

Working out what the instruction is

Where the line is: Decode happens inside the CPU and doesn't carry anything out yet.

Execute (0)

Doing what the instruction says

Where the line is: Execute may read data from main memory or write a result to it, so using memory doesn't automatically mean fetch.

6 of 6 still to sort.

Computer Science · The CPU

Break the loop

  1. Stage 1: Fetch

    main memory → CPU

  2. Stage 2: Decode

    what is it?

  3. Stage 3: Execute

    do it

…and stage 3 leads back to stage 1.

Break the cycle — stop one stage

Exam line: Each stage needs the one before it, and the loop only works whole.

Computer Science · The CPU

Where is the program?

You open a game. It's now running, and the CPU is working through its instructions.

While the game runs, where are its instructions, and how does the CPU get them? Pick the one closest to what you think.
How sure are you?

Exam line: Main memory holds the running program's instructions and its data.

Have a go

Write it, then mark it

Describe how the CPU uses the Fetch-Execute cycle to run a program stored in main memory. [4 marks]

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

Exam line: Say what happens at each stage, not just its name, and finish with the cycle starting again.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Get it, work it out, do it, repeat: how the CPU runs a program held in main memory.

What you need to know

  • The CPU runs a program by repeating one loop: fetch, decode, execute, always in that order.
  • While a program runs, its instructions and its data are held in main memory.
  • Have a goYour friend reckons the CPU swallows the whole program in one gulp and digests it later. Going by what you've just read, where is the program actually kept while it runs?

    In main memory, instructions and data together.

    The CPU does the running, but it isn't where the program is kept. The program sits in main memory the whole time it runs.

  • Main memory holds the running program's instructions and data, and the CPU can read from it and write to it.
  • Fetch: the next instruction is copied to the CPU from main memory.
  • Have a goAn instruction has just been fetched and is now sitting in the CPU. Which stage comes next, and what is its job?

    Decode: work out what the instruction is.

    Having the instruction isn't the same as knowing what it means. The CPU must decode it before it can do anything with it.

  • Decode: the CPU works out what that instruction is.
  • Execute: the instruction is carried out.
  • Executing an instruction may read data from main memory, or write a result back to it.
  • Have a goLOAD Mem 9 copies the number in location 9 into the CPU. In which stage does the CPU read location 9?

    Execute.

    Fetch also reads main memory, but only to get the instruction LOAD Mem 9 itself. The number in location 9 is data, read while LOAD is being carried out.

  • Then the cycle starts again with the next instruction, continually, one instruction at a time.

The big picture

The Fetch-Execute cycle (also called the Fetch-Decode-Execute cycle) is how the CPU runs a program. The program's instructions and data are held in main memory. The CPU fetches the next instruction from main memory, decodes it to work out what it is, then executes it, which may mean reading data from main memory or writing a result back to it. Then it starts again with the next instruction, continually, one instruction at a time.

Key points

1Fetch, decode, execute, then straight back to fetch: the CPU repeats this continually while a program runs.
2Fetch copies the next instruction to the CPU from main memory.
3Decode works out what the instruction is; execute carries it out.
4Main memory holds the running program's instructions and data, and the CPU can read from it and write to it.
5Main memory is used at every fetch, and at execute only when the instruction needs to read or write data.

Worked example

Problem

A program in main memory has four instructions: LOAD Mem 6, ADD 4, ADD 1, STORE Mem 6. It runs once, start to finish. How many times does the CPU use main memory?

⚠ Watch out

Thinking main memory is only used at fetch. Fetch uses it to get the instruction, but execute can use it too: reading data (LOAD) or writing a result (STORE). Ask: is the CPU getting an instruction, or data the instruction asked for?

🧠

Memory hook

The CPU is a chef with a box of recipe cards on the shelf (main memory). FETCH: grab the next card. DECODE: read what it says. EXECUTE: do it, which might mean nipping back to the shelf for an ingredient. Then grab the next card.

✓

Check yourself

Cover the page. A STORE instruction is about to be run. Say what happens to it at fetch, at decode and at execute, and say which of those stages use main memory.

Flashcards

(11)
What are the three stages of the cycle, in order?
Fetch, decode, execute.
What happens at the fetch stage?
The next instruction is copied to the CPU from main memory.
What happens at the decode stage?
The CPU works out what the instruction is.
What happens at the execute stage?
The instruction is carried out. This may involve reading from or writing to main memory.
What happens straight after an instruction is executed?
The cycle starts again: the next instruction is fetched from main memory.
What two things does main memory hold while a program runs?
The program's instructions and the data it is using.
What does the CPU do with main memory?
It reads from it (instructions and data) and writes to it (results).
Why must fetch come before decode?
Decode needs an instruction already sitting in the CPU, and only fetch puts it there.
Why must decode come before execute?
The CPU can't carry out an instruction until it knows what the instruction is.
Does every instruction use main memory when it is executed?
No. Some, like LOAD and STORE, read or write data there; others, like adding a number that is part of the instruction, happen inside the CPU.
Does the CPU take in the whole program at once?
No. It fetches and runs one instruction at a time, repeating the cycle for each.

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

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 28 October 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.