Intermediate

CPU Architecture and the Fetch-Execute Cycle

AicademyAicademy
·OCR GCSE Computer Science·OCR J277·6 min
1.1.1 Architecture of the CPU

What Is the CPU?

The Central Processing Unit (CPU) is the component that carries out the instructions in a program. It is often called the "brain" of the computer, though it does not think — it executes instructions, one after another, at very high speed.

Every program that runs on a computer — from a browser to a game — is a sequence of instructions stored in memory. The CPU's job is to:

  1. Fetch each instruction from memory
  2. Decode what the instruction means
  3. Execute (carry out) the instruction

This three-step loop is the fetch-execute cycle (also called the fetch-decode-execute cycle). It repeats continuously while the computer is running.

CPU Components and Their Roles

The CPU contains several key components:

ComponentFull nameRole
ALUArithmetic Logic UnitPerforms arithmetic (add, subtract) and logical operations (AND, OR, NOT, comparisons)
CUControl UnitDirects the operation of the processor; coordinates fetching, decoding and executing instructions
CacheA small, very fast memory store built into the CPU; holds frequently used data and instructions to speed up access
RegistersSmall, extremely fast storage locations inside the CPU; hold data or addresses being actively used

The CU does not perform calculations — that is the ALU's job. The CU manages the flow of data and instructions, telling other components what to do and when.

Von Neumann Architecture — The Registers

Von Neumann architecture is the design principle underlying most modern computers. In Von Neumann architecture, both program instructions and data are stored in the same memory and fetched by the same CPU. Four specific registers form the core of this architecture:

RegisterFull nameWhat it stores
MARMemory Address RegisterAn address — the location in memory where data or an instruction will be fetched from or written to
MDRMemory Data RegisterData — the actual value fetched from memory or about to be written to memory
PCProgram CounterAn address — the memory location of the next instruction to be fetched
ACCAccumulatorData — the result of the most recent ALU operation

Key distinction: MAR and PC store addresses (where to look in memory). MDR and ACC store data (values being processed).

The Fetch-Execute Cycle in Detail

The CPU continuously repeats this cycle:

Fetch:

  1. The address of the next instruction is copied from the PC to the MAR
  2. The instruction at that address is fetched from memory into the MDR
  3. The PC is incremented (increased by 1) to point to the next instruction

Decode: 4. The CU reads the instruction from the MDR and decodes it — determines what operation is required

Execute: 5. The appropriate action is carried out. If it involves a calculation, the ALU performs it and the result is stored in the ACC

Worked example — CPU executes "add 5 to the current value":

  • PC holds address 100 → MAR ← 100 → fetch instruction at address 100 into MDR
  • PC increments to 101 (ready for next instruction)
  • CU decodes the instruction: "ADD"
  • ALU takes the value in ACC (say, 10) and adds 5 → ACC now holds 15

OCR J277 requires understanding of what each register stores and whether it holds data or an address. Knowledge of exactly how data passes between registers in each step is NOT required.

How much of this have you taken in?

Quiz yourself on this section — free, no card needed.

Test myself

Cache — Fast Temporary Storage

Cache is a small, extremely fast memory store located on or near the CPU chip. When the CPU needs an instruction or piece of data, it checks the cache first before going to the slower main memory (RAM).

  • Cache hit — the data is found in cache: very fast access
  • Cache miss — the data is not in cache: CPU must fetch from RAM (slower), then store a copy in cache for future use

Cache stores instructions and data that the CPU has recently used or is likely to need next. Because programs often repeat instructions (loops) or reuse data, cache significantly reduces the time the CPU spends waiting for memory.

Cache is different from RAM and different from registers. Registers are the fastest (inside the CPU, used for one operation). Cache is the second fastest (on/near the CPU). RAM is slower but much larger.

Common Exam Mistakes

1. Confusing MAR and MDR

MAR holds an address — where in memory to look. MDR holds data — the actual value retrieved. Think: A = Address, D = Data.

2. Saying the CU "performs calculations"

The CU controls and coordinates — it decodes instructions and manages the flow. The ALU performs arithmetic and logic operations.

3. Saying the fetch-execute cycle has only 2 steps

It has three: Fetch, Decode, Execute. Exam questions may ask what occurs at each stage — all three must be named.

4. Confusing cache with RAM or secondary storage

Cache is a fast memory store inside or very close to the CPU. It is not RAM and not a hard drive. Cache stores frequently used instructions/data to reduce waiting time.

MistakeCorrection
"MDR holds the address of the instruction"MDR holds the data/instruction fetched; MAR holds the address
"CU performs arithmetic operations"ALU performs arithmetic; CU controls the operation
"The PC stores data from calculations"PC stores the address of the next instruction; ACC stores calculation results

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set — personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

Programming Languages and IDEs

Next

CPU Performance and Embedded Systems

Related lessons

6 Slides

Lesson

CPU Performance and Embedded Systems

OCR GCSE Computer Science · OCR J277

1 day ago

8 Slides

Lesson

Primary and Secondary Storage

OCR GCSE Computer Science · OCR J277

1 day ago