Registers, the ALU and the Control Unit

You already know the CPU spins endlessly through the fetch–decode–execute cycle. But what actually does the fetching, the decoding and the executing? Inside that postage-stamp of silicon there is no single "brain cell" — there is a small team of specialised parts, each with one job, wired together so tightly that a value can hop from one to the next in a fraction of a nanosecond.

At A-level you are expected to know this team by name and to say exactly what each member does during a single instruction. There are three kinds of part:

Meet each one, then watch them pass a single instruction between them, hand to hand, all the way round one turn of the cycle.

The Arithmetic Logic Unit — the calculator

The ALU is the only part of the CPU that does real arithmetic and logic. It is a bundle of digital circuits that takes one or two binary inputs and produces a result:

The ALU works hand-in-glove with one special register, the accumulator (ACC), which holds the value the ALU is currently working on and catches the result that drops out. The ALU itself has no memory — it is pure combinational logic. Feed it two numbers and an operation and out comes an answer; the moment the inputs change, so does the output. Anything worth keeping has to be copied straight into a register.

The ALU is really a stack of tiny circuits sitting side by side — an adder, an AND gate array, an OR gate array, a comparator, and so on — all fed the same two inputs at once. A group of control lines called the function select then acts like a multiplexer, choosing which circuit's output to let through. So the ALU computes several possible answers in parallel every clock tick and simply picks the one the current instruction asked for. Subtraction, cleverly, is just addition in disguise: to compute a - b the ALU adds a to the two's-complement negative of b, so no separate subtractor is needed at all.

The Control Unit — the conductor

If the ALU is the calculator, the Control Unit is the conductor of the whole orchestra. It does not calculate anything itself. Instead it makes sure every other part acts at exactly the right moment, in the right order. Its jobs are:

Think of the CU as reading each instruction and then pulling a rapid, carefully-timed sequence of levers. It never touches the data's value — it only controls where the data goes and when.

The registers — five stores you must know

A register is a single, extremely fast store inside the CPU that holds one value — typically one word (e.g. 32 or 64 bits). Registers are far faster than main memory because they sit right next to the ALU and control unit, so the CPU keeps the values it needs this instruction in them. Five are named on the A-level specification, and each has one precise job:

Notice how they pair up with the buses. The MAR feeds the address bus (addresses only, one-way out to memory); the MDR sits on the data bus (data and instructions, both ways). The PC keeps our place in the program; the CIR holds the instruction under the control unit's nose; the ACC works alongside the ALU.

How they fit together

Here is the whole team as a block diagram: the ALU and control unit, the five registers, and main memory reached across the address, data and control buses. Step through it to see each part appear.

Everything the CPU does with memory goes through the MAR/MDR pair — the MAR says where, the MDR carries what. Every calculation goes through the ALU/ACC pair. And the control unit quietly pulls the strings on all of it, driven by whatever instruction currently sits in the CIR.

Tracing one instruction, register by register

This is the part examiners love: describe the fetch–decode–execute cycle in terms of the registers. Suppose the PC holds address 100; the instruction stored there is "ADD the value at address 200"; and memory location 200 holds the number 5. Step through and watch each register's value change, one micro-operation at a time.

Read the whole trace as one sentence: the MAR keeps saying where, the MDR keeps carrying what, the PC quietly moves on to the next line, the CIR holds the instruction being obeyed, and the ACC collects the answer from the ALU. That is the cycle, told through the registers.

It looks odd to move the PC on to 101 before we have even finished with the instruction at 100. But it is deliberate: the PC's only job is to name the next instruction, and the cleanest moment to update it is the instant we have used its current value to load the MAR. By the time we reach execute, the PC is already correctly pointing at what comes next — so if the instruction turns out to be a jump, execute can simply overwrite the PC with the jump's target address, and the cycle carries on from there without any special case. Increment early, and branching becomes just "put a different number in the PC".

The single most common exam slip here is mixing up what each register holds. Pin these down and you will not lose the marks:

A neat memory hook: MAR = "where" (Address), MDR = "what" (Data). And a second trap: the control unit does not do arithmetic — it only decodes and directs. All the adding, subtracting and comparing is the ALU's job. Say "the control unit added the numbers" in an exam and you will lose the mark.