Skip to content
Study Hall
Lesson 1 of 5Hardware, Software and Operating Systems
Unit 2 · Lesson 1 of 5

The CPU and the Motherboard

What the processor actually does on every clock tick, and how the motherboard connects it to everything else.

4 min read9 practice questionsAsk AI about this →

Key things to remember

  1. 1The machine cycle is fetch → decode → execute → store, repeated billions of times per second.
  2. 2Inside a core: control unit (directs), ALU (calculates), registers (hold the current values).
  3. 3The program counter holds the address of the NEXT instruction.
  4. 4Three buses: address (where), data (what), control (read or write, and when).
  5. 5A 32-bit address bus can address bytes = 4 GiB — the historical 32-bit RAM ceiling.
  6. 6Clock speed only compares fairly within one CPU generation; cores, cache and IPC matter as much.

The CPU has a reputation as the "brain" of the computer, which oversells it. A better description is an extremely fast, extremely literal clerk. It can fetch one instruction, work out what it means, do one arithmetic or logic operation, and store the result — and that is essentially all it can do. It just does it billions of times per second, and that is enough to render a video, run a game, or forecast the weather.

One machine cycle. Clock speed is how many of these happen per second.FETCHRead the instruction at the address in the program counterDECODEControl unit works out which operation and which operandsEXECUTEALU does the arithmetic or logicSTOREWrite the result to a register or memory, then PC advances3.2 GHz = 3.2 billion clock ticks per second. Multiple cores run separate cycles at once.
Fig 1The machine cycle. Clock speed counts how many of these run per second.

The three parts inside a core

  • Control unit (CU) — reads each instruction, decodes it, and sends the right signals to the rest of the chip. It never does arithmetic itself; it directs.
  • Arithmetic logic unit (ALU) — performs addition, subtraction, comparison, AND, OR, NOT and bit shifts. Every calculation a program makes ends up here.
  • Registers — a handful of tiny, extremely fast storage locations inside the CPU. The program counter (PC) holds the address of the next instruction; the instruction register (IR) holds the one being executed; general registers hold the values being worked on.
Fetch, decode, execute, store
FETCH the instruction at the address in the program counter. DECODE it in the control unit. EXECUTE it in the ALU. STORE the result and advance the program counter. That loop is the machine cycle, and every program you will ever write is eventually turned into millions of them.

What actually makes one CPU faster than another

SpecificationWhat it meansWhy it matters
Clock speed (GHz)Cycles per second — 3.2 GHz is 3.2 billionMore cycles per second, but only comparable within one architecture
CoresIndependent processing units on one chipGenuinely parallel work; useless for single-threaded software
ThreadsLogical cores the OS can schedule ontoHyper-threading keeps a core busy while one thread waits
Cache (L1/L2/L3)Small fast memory inside the CPUHides slow RAM; a cache miss can cost hundreds of cycles
IPCInstructions completed per clock cycleWhy a 3 GHz modern chip beats a 3 GHz chip from 2010
TDP (W)Heat the cooler must removeSets the cooling and the power supply you need

The practical consequence is that you cannot rank two CPUs by clock speed alone. A 3.0 GHz chip with better IPC, more cache and eight cores will beat a 3.6 GHz chip with four cores on almost everything. Clock speed is only a fair comparison between two chips of the same generation and family.

CPUsocketRAM (DIMM)chipset+ BIOS chipPCIe expansion slots (GPU, NIC)M.2 (NVMe SSD)SATA ports24-pin power
Fig 2The motherboard: sockets, slots and the buses between them.

The motherboard and its buses

The motherboard is the printed circuit board everything plugs into, and its job is to carry signals between components. The wires that carry those signals in parallel groups are called buses. There are three, and they always work together: the address bus carries the location being accessed, the data bus carries the actual contents, and the control bus carries the signals that say whether this is a read or a write and when the data is valid.

Bus width
A 64-bit data bus moves 8 bytes per transfer. A 32-bit address bus can name = 4 294 967 296 distinct byte locations, which is exactly 4 GiB — and is precisely why 32-bit operating systems could not use more than 4 GB of RAM.
  • CPU socket — holds the processor. Sockets are physically and electrically specific, so a CPU only fits a matching socket and chipset.
  • DIMM slots — hold the RAM modules. Filling them in matched pairs enables dual-channel operation, which roughly doubles memory bandwidth.
  • PCIe slots — high-speed expansion for graphics cards, network cards, capture cards. A x16 slot has sixteen lanes; a x1 slot has one.
  • Chipset — manages communication between the CPU, memory, storage and peripherals; it determines which CPUs and features the board supports.
  • SATA and M.2 — storage connectors. M.2 NVMe drives connect over PCIe and are several times faster than SATA.
  • Form factor — ATX, microATX and mini-ITX describe physical size and mounting-hole positions, and must match the case.
Compatibility is not optional
Before buying a CPU, check the socket AND the chipset AND that the board's firmware supports that specific processor. A CPU can fit a socket perfectly and still refuse to boot because the board shipped with older firmware.

Worked examples

Reveal one step at a time and try to beat it to the next line.

Example 1
A CPU runs at 2.5 GHz. Assuming one simple instruction completes per clock cycle, how many instructions can one core execute in 3 milliseconds?
Example 2
CPU A runs at 4.0 GHz with 4 cores. CPU B runs at 3.2 GHz with 12 cores and a newer architecture. Which would you choose for video rendering, and which for an older single-threaded game? Justify both.
Example 3
Explain why a 32-bit version of Windows cannot use 8 GB of installed RAM, using the address bus.

Where marks get lost

  • Ranking CPUs by clock speed across different generations — IPC improvements make that comparison meaningless.
  • Saying the ALU decodes instructions. The control unit decodes; the ALU only calculates.
  • Thinking cache is a type of RAM slot you can upgrade. Cache is fabricated inside the CPU and is fixed.
  • Assuming a CPU works in any board with the same socket. The chipset and firmware version matter too.
  • Confusing cores with threads. Four cores with hyper-threading present eight threads, but there are still only four sets of execution hardware.

Flashcards 9

The four stages of the machine cycle
What does the control unit do?
What does the ALU do?
Program counter (PC)
+ 5 more

Practice

1
Which register holds the address of the next instruction to be fetched?
2
Put the stages of the machine cycle in order.
  1. 1Decode it in the control unit
  2. 2Store the result and advance the PC
  3. 3Execute it in the ALU
  4. 4Fetch the instruction from memory
3
A 3.6 GHz core completes one instruction per cycle. How many instructions does it execute in 2 milliseconds? Give your answer in millions.
million
4
Why does a CPU have cache memory at all?
5
A motherboard's address bus is 40 bits wide. How much memory can it address?
6
Which bus carries the signal that says whether an operation is a read or a write?
7
A student installs 16 GB of RAM as one single module in a dual-channel board. What is the consequence?
8
Match each component to its job.
Control unit
ALU
Register
Chipset
9
Which upgrade would most help a program that runs as a single thread and constantly re-reads a small 2 MB table?

Spot a mistake on this page? Let us know