Computer Architecture
Revise Computer Architecture for Computer Science 0478 (O Level) — revision notes and instant AI marking. Free to start.
Computer Architecture
📋 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).
Every device follows the same input → process → output pattern:
| Step | Example |
|---|---|
| Input | A keyboard is used to input a number |
| Process | If the instruction is ADD, the inputted value is added to an existing value |
| Output | The result of the calculation is shown to the user on the monitor |
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.
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
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.
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
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.
Example:
| Register | Acronym | What it does |
|---|---|---|
| Program Counter | PC | Holds the memory address of the next instruction to be executed. Increments by 1 as the cycle runs. |
| Memory Address Register | MAR | Holds the memory address of where data or an instruction is to be fetched from. |
| Memory Data Register | MDR | Stores the actual data or instruction that has just been fetched from memory. |
| Current Instruction Register | CIR | Stores the instruction the CPU is currently decoding or executing. |
| Accumulator | ACC | Stores the results of any calculations performed by the ALU. |
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.
| Bus | Direction | Carries |
|---|---|---|
| Address bus | Unidirectional (one-way) | Location data — the address of where to read/write |
| Data bus | Bidirectional (two-way) | The actual data or instructions themselves |
| Control bus | Bidirectional (two-way) | Commands and control signals — e.g. "start a read" |
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.
1Fetch Stage — grab the instruction
Step by step, here's exactly what happens:
- The Program Counter (PC) holds the address of the next instruction to be fetched.
- That address is copied into the Memory Address Register (MAR).
- The address is sent along the address bus and waits for a signal from the control bus.
- The Control Unit (CU) sends a signal along the control bus to main memory.
- The instruction is retrieved and transferred to the Memory Data Register (MDR) via the data bus.
- A copy of the instruction is stored in the Current Instruction Register (CIR).
- The PC increments by 1, so it now points to the next instruction to be fetched.
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:
| Part | Meaning |
|---|---|
| Opcode | What the instruction actually (e.g. ADD, SUB, LOAD) |
| Operand | What to do it — this could be a piece of data, or an address telling the CPU where the data is stored |
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
2. The instruction is decoded.
3. The instruction is executed.
4. The cycle repeats — billions of times per second.
Explain how an instruction is fetched using Von Neumann architecture.
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.
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.
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
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.
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.
| Instruction | Mnemonic | Binary code | Command |
|---|---|---|---|
| Add | ADD | 10100001 | Adds a value to the value currently stored in the accumulator (ACC) |
| Subtract | SUB | 00100010 | Subtracts a value from the value stored in the accumulator |
| Load | LDA | 10111111 | Loads the value stored in a memory location into the accumulator |
| Store | STA | 01100000 | Stores the value in the accumulator to a specific location in memory |
| Stop | HLT | 00000000 | Stops the program |
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
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
✅ Concepts Checklist
🎯 Exam Tips & Common Mistakes
- 1. The CPU & Microprocessors
- 🎯 Exam Tips & Common Mistakes
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 →