Chapter 3

Computer Architecture and the CPU

How the CPU runs programs using the fetch-decode-execute cycle, registers, buses and the Von Neumann model of stored data.

The Von Neumann model

Most modern computers follow the Von Neumann architecture, in which program instructions and data are stored together in the same memory. The central processing unit (CPU) reads these instructions from memory and carries them out one at a time. The main parts of the CPU are the arithmetic logic unit (ALU), which performs calculations and logic, the control unit (CU), which manages and coordinates the CPU, and small fast stores called registers.

The fetch-decode-execute cycle

The CPU processes each instruction through a repeating cycle:

  • Fetch - the next instruction is copied from memory into the CPU.
  • Decode - the control unit works out what the instruction means.
  • Execute - the instruction is carried out, for example an addition in the ALU.

Key idea

The program counter (PC) holds the address of the next instruction, and the memory address register (MAR) and memory data register (MDR) handle the address and the data moving between the CPU and memory.

Buses and performance

Data travels around the computer along buses. The address bus carries memory addresses, the data bus carries the actual data, and the control bus carries signals. A higher clock speed (measured in gigahertz), more cores, and a larger cache generally allow the CPU to process more instructions each second.

Remember

  • The ALU does calculations; the CU coordinates.
  • Fetch, then decode, then execute - always in that order.
  • The PC points to the next instruction to fetch.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor