Inside the CPU
Open up the processor. Meet the ALU, the Control Unit, cache and registers, put each one on a block diagram, and follow an instruction through fetch, decode and execute at the level OCR actually asks for.
Get the method right under pressure
Free interactive practice on the steps that lose marks under exam pressure.
Start revising freeWhat you'll cover
The part that does the work
Every program you run is a long list of very simple **instructions**. The **CPU** (central processing unit) is the part of the computer that carries them out, one after another. It does not store your files and it does not draw the screen by itself. Its job is narrower than that, and more important: **fetch an instruction, work out what it means, and do it** - millions of times a second, for as long as the machine is on.
The four parts OCR asks about
Inside the CPU, four parts share the work.
Put the names on the diagram
Each block on this CPU diagram says what it does. Drag the right name onto each one.
What would stop first?
If the Control Unit stopped working, what would go wrong first?
- Nothing would be decoded, so the other parts would not be told what to do
- Additions and comparisons would stop being calculated
- Saved files would be lost from the hard disk
- The screen would be drawn at a lower resolution
One instruction, three stages
The CPU repeats the same three stages for every single instruction. This is the **fetch-execute cycle**. **Fetch** - the next instruction is collected from main memory into the CPU. **Decode** - the Control Unit works out what the instruction is asking for. **Execute** - the instruction is carried out. If it needs arithmetic or a comparison, this is where the ALU does it, with the values held in registers. Then it starts again with the next instruction, and keeps going.
Run the cycle
Put one turn of the fetch-execute cycle into the right order.
- The next instruction is collected from main memory
- The Control Unit works out what the instruction means
- The instruction is carried out, using the ALU if there is a calculation
- The CPU begins again with the following instruction
Where does it come from?
At the start of each cycle the CPU collects the next instruction. Tap the place it collects it from.
Two fast stores, two jobs
Cache and registers are both inside the CPU and both far faster than main memory, so they are easy to confuse. What separates them is how much they hold and what for.
True about cache
Select the TWO statements that are true about cache.
- It holds copies of data and instructions from main memory
- More cache usually means the CPU waits for main memory less often
- It keeps its contents when the power is switched off
- It is larger than main memory
The cycle in words
In the fetch stage the next instruction is collected from _____. The _____ then decodes it and directs the other parts. If the instruction needs a calculation or a comparison, the _____ does that work in the _____ stage, using values held in the _____.
What a full answer looks like
**"Describe the role of the ALU in the fetch-execute cycle. (2 marks)"** "The ALU carries out arithmetic and logical operations. During the execute stage it performs the calculation or comparison the instruction asks for, working on values held in registers." Two marks, two moves: what the part does, then where it does it in the cycle. "Describe" wants the how, so naming the ALU on its own would score one at best.
What OCR does not ask for
A revision video about the fetch-execute cycle names the MAR, the MDR, the Program Counter and the Accumulator. For OCR J277, what should you do with that detail?
- Leave it out. J277 asks for the ALU, Control Unit, cache and registers, not named special-purpose registers
- Memorise all four names, because every board expects them
- Use those names instead of ALU and Control Unit in your answers
- Learn the Program Counter only, since it drives the fetch stage
Build the description
Build a sentence that describes the fetch stage accurately.
Your turn: describe the cycle
Describe the fetch-execute cycle, and explain the part the ALU and the Control Unit each play in it.
- Name the three stages in the right order
- Say where the instruction is collected from
- Explain what the Control Unit does with it
- Explain when the ALU is used and what it works on