The part of the CPU that turns each instruction into control signals — built two ways: hardwired logic (fast, rigid) or microprogrammed (flexible, slower).
The control unit is the conductor of the CPU. It takes each instruction's opcode and turns it into the right set of control signals — the on/off lines that steer data through the rest of the hardware. A control signal might *drive a register onto the bus*, *latch a value*, or *tell the ALU to add*. The control unit does not compute results itself; it tells every other block what to do, step by step.
Two ways to build one
There are two classic designs, and they make opposite trade-offs between speed and flexibility.
1Hardwired control — the signals are produced by fixed combinational logic: decoders and gates wired straight from the opcode to the control lines. It is fast and cheap, but changing the instruction set means *redesigning the circuit*.
2Microprogrammed control — the signals for each instruction are stored as a tiny program (a microprogram) in a small control memory. A microPC steps through microinstructions, each of whose bits asserts one control signal. It is slower (an extra memory read per step) but easy to extend or patch.
The core trade-off
Hardwired control is logic frozen into silicon: blazing fast, painful to change. Microprogrammed control is *software for the hardware* — you can add or fix an instruction by editing the microcode, no rewiring. RISC chips lean hardwired for speed; complex CISC instruction sets historically leaned microprogrammed for manageability.
A microinstruction is a row of switches
Picture the microprogram as a table. Each microinstruction is one row; each column is a control signal. A 1 in a column asserts that signal during this step. The microPC points at the current row and advances down the table, issuing the signals needed to carry one instruction through fetch, decode, and execute.
Microprogram (each bit = one control signal):
microPC | PCout MARin MemRead IRin ALUadd RFwrite
0 | 1 1 0 0 0 0 ; PC -> MAR
1 | 0 0 1 1 0 0 ; Mem -> IR
2 | 0 0 0 0 1 1 ; ALU result -> reg
microPC steps 0 -> 1 -> 2, asserting each row's signals in turn.
Microcode patches are real
Because microprogrammed control is editable, modern CPUs ship microcode updates that the firmware loads at boot — fixing hardware bugs or security flaws without replacing the chip. That patchability is the practical payoff of not freezing every signal into gates.
OperationTimeSpace
Hardwired · rigid — redesign to changefast (pure logic)small
Microprogrammed · flexible and patchableslower (memory read/step)control memory
Check yourself
What is the main advantage of microprogrammed control over hardwired control?