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.
Press Next one phase at a time. Every value here is set by the lesson, not run by the page.
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.
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
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?
What happens at the fetch stage?
What happens at the decode stage?
What happens at the execute stage?
What happens straight after an instruction is executed?
What two things does main memory hold while a program runs?
What does the CPU do with main memory?
Why must fetch come before decode?
Why must decode come before execute?
Does every instruction use main memory when it is executed?
Does the CPU take in the whole program at once?
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 postedMore AQA GCSE Computer Science topics
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.