Central Processing Unit (CPU) architecture

Computer Science AS · Processor fundamentals. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science AS topics

The idea

In the Von Neumann model, instructions and data are held together in the same memory, and the processor fetches and runs the instructions one after another. This is the stored program concept.

The CPU has a Control Unit, which sends signals to manage the other parts, an Arithmetic and Logic Unit (ALU), which does calculations and comparisons, and registers, which are very fast stores inside the processor. Three buses carry addresses, data and control signals between the CPU and memory.

The processor repeats the Fetch-Execute cycle. At the end of each cycle it checks for an interrupt: a signal from a device or program that needs attention.

In simpler words

In a Von Neumann computer, the program and the data sit in the same memory. The CPU fetches one instruction, works it out and runs it, then fetches the next. The control unit runs things. The ALU does maths and comparisons. Registers are tiny fast stores inside the CPU. Buses carry addresses, data and signals. After each cycle the CPU checks for interrupts.

An everyday comparison

A cook following a recipe book is like the Fetch-Execute cycle: a bookmark shows the next step, the cook reads the step, does it, and moves the bookmark on. The bookmark is like the Program Counter, holding the place, not the instruction. The comparison stops working because the CPU copies each instruction into registers such as MDR and CIR before carrying it out, and it checks for interrupts at the end of every cycle.

Rules to remember

Common mistake

Students say the PC holds the current instruction. The PC holds only an address, the address of the next instruction; the instruction itself is in the CIR.

In the exam

Write the fetch stage in register transfer notation, in this order: MAR ← [PC]; PC ← [PC] + 1; MDR ← [[MAR]]; CIR ← [MDR]. Name each register's exact role, e.g. the PC holds the address of the next instruction. For buses, state direction: address bus one way, data bus both ways. For interrupts, list the steps: checked at end of cycle, registers saved, PC loaded with the ISR address, registers restored. For performance, name factors such as cores and clock speed.

Worked example

The PC contains 200 and memory location 200 contains the instruction LDD 85. What do the MAR, PC and CIR contain at the end of the fetch stage?

  1. MAR ← [PC]: the MAR now contains 200.
  2. PC ← [PC] + 1: the PC now contains 201.
  3. MDR ← [[MAR]]: the contents of location 200, the instruction LDD 85, are copied to the MDR.
  4. CIR ← [MDR]: the instruction LDD 85 is copied to the CIR.

Answer: MAR = 200, PC = 201 and the CIR holds LDD 85.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Read the full notes

Keep going

← Logic gates and logic circuitsAssembly language →Take a Computer Science AS test