Library Computer Science 0478 Computer Architecture
O Level · Computer Science 0478

Computer Architecture

Revise Computer Architecture for Computer Science 0478 (O Level) — revision notes and instant AI marking. Free to start.

📖 Revision notes · preview
Cambridge IGCSE (CIE) Computer Science

Computer Architecture

The Big Idea: A computer works because its CPU constantly grabs an instruction from memory, figures out what that instruction means, and then does it — over and over, billions of times a second.

📋 Summary — Everything In This Chapter

  • The CPU is the "brain" of the computer — its job is to fetch, decode, and execute instructions.
  • A microprocessor is the physical chip that houses the CPU (and often other parts too).
  • The Von Neumann architecture describes how the CPU, memory, and I/O devices are connected and work together.
  • The CPU has 5 key registers: PC, MAR, MDR, CIR, and ACC — each with one specific job.
  • Data moves between components along three buses: Address, Data, and Control.
  • The Fetch-Decode-Execute cycle is the repeating process that actually runs every program.
  • CPU performance depends on three characteristics: clock speed, cache size, and number of cores.
  • An instruction set is the CPU's "dictionary" of commands it understands, written in machine code.
  • Embedded systems are small, dedicated computers built into larger devices (like washing machines).

1. The CPU & Microprocessors

1What actually is the CPU?

The Central Processing Unit (CPU) is the component inside every computer, games console, laptop, and phone that does the actual "thinking." Its one job — its — is to fetch an instruction, decode it (work out what it means), and execute it (actually do it).

🍳 Analogy: Think of the CPU like a chef following a recipe card. The chef fetches the next line of the recipe (reads it), decodes it (works out what "fold in the eggs" actually means), and then executes it (actually folds in the eggs). Then moves to the next line. That's it — that's the whole loop, just repeated non-stop.

Every device follows the same input → process → output pattern:

StepExample
InputA keyboard is used to input a number
ProcessIf the instruction is ADD, the inputted value is added to an existing value
OutputThe result of the calculation is shown to the user on the monitor
Exam Keyword Rule

Always say the CPU "fetches, decodes, and executes" instructions.

Writing "the CPU processes data" is too vague and won't get you the mark — examiners are matching your answer against a mark scheme that expects these exact three words.

Practice Question

In one sentence, state the purpose of the CPU.

2CPU vs. Microprocessor — don't mix these up

This is one of the most commonly confused pairs in the whole topic, so let's be really precise about it.

A microprocessor is a type of integrated circuit contained on a single chip. It's the actual physical hardware you could pick up and hold. It the CPU, and often other components too, such as:

  • Memory controllers
  • I/O interfaces
🧠 The Key Distinction
The CPU is a component (it's the logical part that does fetch-decode-execute). The microprocessor is the chip — the physical container that the CPU (and sometimes other parts) sits inside. So the CPU is a microprocessor, not the same thing as it.
Practice Question

Explain the difference between a CPU and a microprocessor.

2. Von Neumann Architecture

Proposed by mathematician John Von Neumann in the 1940s, this architecture is the blueprint that most general-purpose computers are still built on today. It describes how the memory, input/output devices, and processor all connect and communicate.

INPUT DEVICES │ ▼ ┌──────────────────┐ ┌───────────┐ ┌─────────────┐ │ I/O CONTROLLERS │◄──────►│ PROCESSOR │◄────►│ MAIN MEMORY │ └──────────────────┘ └───────────┘ └─────────────┘ │ ▲ ▼ │ OUTPUT DEVICES SECONDARY STORAGE

The Von Neumann architecture is built from three core parts:

  • Control Unit (CU) — the "manager" that coordinates everything
  • Arithmetic Logic Unit (ALU) — does the maths and logic
  • Registers — tiny, super-fast storage spots inside the CPU

...plus buses, the "roads" that carry data between all these parts.

aArithmetic Logic Unit (ALU)

The ALU is the calculator of the CPU. It performs two types of operation:

  • Arithmetic operations — addition, subtraction, etc.
  • Logical decisions — comparisons like IF X > 5 THEN...

bControl Unit (CU)

The CU is the coordinator — it doesn't do the maths itself, but it directs traffic. It:

  • Coordinates how data moves around the CPU by sending control signals
  • Decodes the instructions that have been fetched from memory
🚦 Analogy: If the ALU is the worker doing the actual job, the CU is the site foreman — shouting instructions, making sure the right data goes to the right place at the right time, but never lifting a brick itself.

cRegisters — the CPU's tiny notepads

Registers are extremely small, extremely fast memory locations built inside the CPU itself (not in RAM). They hold small amounts of data that the CPU needs right now, as part of the fetch-decode-execute cycle. Each register has one specific, dedicated job — this matters a lot for exams, because a common trap is describing what a register stores explaining or it's used.

✏️ Exam Formula for Full Marks
For any register question, use this sentence structure:


Example:
RegisterAcronymWhat it does
Program CounterPCHolds the memory address of the next instruction to be executed. Increments by 1 as the cycle runs.
Memory Address RegisterMARHolds the memory address of where data or an instruction is to be fetched from.
Memory Data RegisterMDRStores the actual data or instruction that has just been fetched from memory.
Current Instruction RegisterCIRStores the instruction the CPU is currently decoding or executing.
AccumulatorACCStores the results of any calculations performed by the ALU.
Practice Question

State the purpose of the Memory Address Register (MAR).

dBuses — the CPU's road network

Components inside the CPU (and the wider computer) are connected by buses. A bus is simply a set of parallel wires through which data or signals travel from one component to another.

┌───────────────┐ ┌─────────┐ ┌───────────────┐ │ CPU │ │ MEMORY │ │ INPUT / OUTPUT │ │ (ALU, REGS, │ │ │ │ │ │ CONTROL) │ │ │ │ │ └───────┬───────┘ └────┬────┘ └───────┬───────┘ │ │ │ ═════╪═════════════════════╪═════════════════════╪═════ DATA BUS (both ways) │ │ │ ═════╪═════════════════════╪═════════════════════╪═════ ADDRESS BUS (one way, out) │ │ │ ═════╧═════════════════════╧═════════════════════╧═════ CONTROL BUS (both ways)
BusDirectionCarries
Address busUnidirectional (one-way)Location data — the address of where to read/write
Data busBidirectional (two-way)The actual data or instructions themselves
Control busBidirectional (two-way)Commands and control signals — e.g. "start a read"
⚠️ Common Mistake
Students often mix up the address bus and data bus. Remember: the address bus only ever carries a location (it's one-way) — think of it like writing an address on an envelope. The data bus carries the actual contents (it's two-way, because data can be read OR written).
Worked Example (4 marks)

Describe the role of the control unit, the control bus, the data bus, and the address bus when fetching an instruction from memory.

3. The Fetch-Decode-Execute Cycle (FDE)

This is the heart of the whole chapter. The Fetch-Decode-Execute Cycle is the process the CPU runs through billions of times per second to make a computer actually do anything. Every single thing your computer does — from moving a mouse cursor to rendering a video game — boils down to this cycle repeating over and over.

FETCH
DECODE
EXECUTE

1Fetch Stage — grab the instruction

Step by step, here's exactly what happens:

  1. The Program Counter (PC) holds the address of the next instruction to be fetched.
  2. That address is copied into the Memory Address Register (MAR).
  3. The address is sent along the address bus and waits for a signal from the control bus.
  4. The Control Unit (CU) sends a signal along the control bus to main memory.
  5. The instruction is retrieved and transferred to the Memory Data Register (MDR) via the data bus.
  6. A copy of the instruction is stored in the Current Instruction Register (CIR).
  7. The PC increments by 1, so it now points to the next instruction to be fetched.
Memory Trick

PC → MAR → (address bus) → CU signals → memory replies via data bus → MDR → CIR, and PC +1

Practise writing this chain out from memory — this exact sequence is one of the most frequently tested 6-mark questions in this topic.

2Decode Stage — work out what it means

The CPU now needs to work out what is required from the instruction it just fetched. Every instruction is split into two parts:

PartMeaning
OpcodeWhat the instruction actually (e.g. ADD, SUB, LOAD)
OperandWhat to do it — this could be a piece of data, or an address telling the CPU where the data is stored
📮 Analogy: Think of an instruction like a text message: "Send [£20] to [Mum]". The opcode is the verb ("Send") — it tells you the action. The operand is everything else — the details of what/who it applies to.

3Execute Stage — actually do it

Finally, the CPU carries out the instruction it fetched and decoded. Depending on what the instruction was, this could mean:

  • Performing a calculation (using the ALU)
  • Storing a result or data back into main memory (RAM)
  • Going back to main memory to fetch data from a different location
✅ The 4 Things to Never Forget
1. An instruction or data is fetched from memory.
2. The instruction is decoded.
3. The instruction is executed.
4. The cycle repeats — billions of times per second.
Worked Example (6 marks)

Explain how an instruction is fetched using Von Neumann architecture.

💡 Mark-Allocation Tip
Always check the marks available before answering. Low-mark questions (1–2 marks) usually just want you to name the steps. High-mark questions (4–6 marks) want you to explain how registers and buses are involved at each step.

4. Characteristics of the CPU

Not all CPUs perform equally — three key characteristics determine how fast and powerful a CPU is:

  • Clock Speed
  • Cache Size
  • Number of Cores

aClock Speed

The clock speed is measured in Hertz (Hz) and measures the number of fetch-decode-execute cycles that can happen in 1 second. The faster the clock speed, the more instructions can be fetched and executed per second.

Modern computers measure clock speed in Gigahertz (GHz) — where "giga" means billion.

Worked Calculation

A clock speed of 3.5 GHz = up to 3.5 billion instructions per second.

Simple rule: GHz value × 1 billion = instructions per second (assuming one instruction per cycle, and a single core).

bCache Size

Cache is very small, very fast memory located on or extremely close to the CPU. It's used as temporary storage that keeps a copy of frequently used instructions and data ready to go.

  • The larger the cache, the more frequently-used items can be stored there.
  • This means the CPU has to complete fewer fetch cycles from RAM — which is much slower to access than cache.
  • Result: better overall performance, because reading from cache is significantly faster than reading from RAM.
🎒 Analogy: RAM is like a filing cabinet across the room — you can get anything from it, but it takes a walk. Cache is like the notes already sitting on your desk — instant access, but you can only fit a few there. The bigger your desk (cache), the less often you need to get up and walk to the cabinet (RAM).

cNumber of Cores

A core works like it is its own mini-CPU. A processor with multiple cores has multiple separate processing units that can each fetch, decode, and execute instructions at the same time (this is called parallel processing).

Each core in a multi-core processor has its own:

  • Control Unit (CU)
  • Arithmetic Logic Unit (ALU)
  • Accumulator (ACC)
  • Registers
Worked Calculation

A quad-core CPU (4 cores) running at 3 GHz can perform up to 12 billion instructions per second.

Working: 4 cores × 3 billion instructions per second (per core) = 12 billion instructions per second total.

Worked Example (2 marks)

One computer has a single-core processor and another has a dual-core processor. Explain why having a dual-core processor might improve the performance of the computer.

5. CPU Instruction Sets

An instruction set is a list of all the commands that a particular CPU can process. Each command has a corresponding binary code, called machine code.

Each instruction is also given a mnemonic — a short, human-readable label (like ADD or SUB) that indicates what the instruction does. After the CPU decodes an instruction, it matches the binary pattern to an entry in its instruction set, so it knows exactly what operation to carry out during the execute stage.

InstructionMnemonicBinary codeCommand
AddADD10100001Adds a value to the value currently stored in the accumulator (ACC)
SubtractSUB00100010Subtracts a value from the value stored in the accumulator
LoadLDA10111111Loads the value stored in a memory location into the accumulator
StoreSTA01100000Stores the value in the accumulator to a specific location in memory
StopHLT00000000Stops the program
🔑 Key Fact
Instruction sets are machine-specific. A program written using Intel's instruction set will not run on a device using an ARM processor, because the two chips understand different binary "languages."
Practice Question

Using the instruction set above, what operation would be performed if the instruction was 00100010 00000010?

6. Embedded Systems

An embedded system is a computer system built to perform one dedicated function, housed inside a larger mechanical device. Unlike a laptop or phone (which can run all sorts of different programs), an embedded system is designed to do just one job, and do it well.

Classic examples that examiners expect you to know:

  • Heating thermostats
  • Hospital equipment
  • Washing machines
  • Dishwashers
  • Coffee machines
  • Satellite navigation systems
  • Factory equipment
  • Security systems
  • Traffic lights

Properties of an embedded system:

  • Small in size
  • Use less power than a general-purpose computer
  • Have a lower cost
⚠️ Watch Out
Stick to the examples above — don't use a fridge or kettle in your answers. Even though they seem "single-purpose," most fridges/kettles don't actually contain a CPU, so they won't appear on a mark scheme.
Worked Example

Tick two boxes to show which of these are examples of an embedded system, then justify your choice: Laptop / Washing Machine / Mobile Phone / Car Engine Management System.

🧠 What to Memorise

CPU
Fetches, decodes, and executes instructions — the "brain" of the computer.
Microprocessor
A single chip that houses the CPU (and often other components).
Von Neumann Architecture
Model connecting CPU, memory, and I/O; contains CU, ALU, and registers.
ALU
Performs arithmetic operations and logical decisions.
CU
Coordinates data movement and decodes instructions.
PC
Holds the address of the next instruction; increments by 1 each cycle.
MAR
Holds the address of data/instruction to be fetched from memory.
MDR
Stores the data/instruction just fetched from memory.
CIR
Stores the instruction currently being decoded or executed.
ACC
Stores the results of ALU calculations.
Address Bus
One-way; carries memory location data.
Data Bus
Two-way; carries actual data/instructions.
Control Bus
Two-way; carries commands/control signals.
Clock Speed
Cycles per second (Hz); higher = more instructions/sec.
Cache
Small, ultra-fast memory near the CPU; reduces fetches from RAM.
Cores
Independent processing units enabling parallel processing.
Instruction Set
List of all commands (in machine code) a CPU can process; machine-specific.
Opcode / Operand
Opcode = what to do; Operand = what to do it to.
Embedded System
Dedicated-function computer built inside a larger device.

✅ Concepts Checklist

🎯 Exam Tips & Common Mistakes

Use the exact keywords. "The CPU processes data" is too vague — always say "fetch, decode, and execute." Mark schemes are looking for these specific words.
Don't confuse address bus and data bus. Address bus = one-way, carries locations only. Data bus = two-way, carries the actual data/instructions.
Check the mark allocation. A 2-mark question wants named steps only. A 6-mark question wants you to explain registers and buses are used at each stage — the "how" is where marks are gained or lost.
Register answers need "what" AND "why." Don't just say what a register stores — explain how it's used in the fetch-execute cycle. Use the formula: "[Register] holds [what], which is used to [why/how]."
Only use approved embedded system examples. Washing machines, thermostats, traffic lights — yes. Fridges and kettles — no, since most don't contain a CPU and won't appear on mark schemes.
Remember the difference between CPU and microprocessor. This distinction is tested often — the CPU is a component, the microprocessor is the chip that houses it.
Computer Architecture Revision Guide · Cambridge IGCSE Computer Science · Built for offline study
🔓 Read the full Computer Architecture note — free You're seeing the preview · free account, no card needed
Also in the full note
  • 1. The CPU & Microprocessors
  • 🎯 Exam Tips & Common Mistakes
What's inside
📖 Revision notes 🎯 Learn mode ✦ AI flashcards ✓ Instant AI marking 🧊 3D explorers 🧪 Experiments & simulations 📈 Progress tracking
📄 Practise Computer Architecture with Computer Science 0478 past papers Every paper with its mark scheme — answer online, marked instantly. Open →

Read the full Computer Architecture notes free

That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.

Unlock the full notes free →

More Computer Science topics