A register stores a whole binary word. It is n D flip-flops side by side, all driven by the same clock. Flip-flop i holds bit i: its input is Dᵢ and its output is Qᵢ.
Why it matters: a single flip-flop remembers one bit, but hardware works with numbers, addresses and instructions. A register lets a circuit keep an n-bit value from one clock cycle to the next, which is what makes counting, running totals and programs possible.
How it behaves:
- At each rising edge, every flip-flop samples its own D at the same instant, so the whole word is captured together.
- Between edges the register holds its value, whatever the inputs do.
- An n-bit register can hold 2ⁿ different values (0 to 2ⁿ − 1 if unsigned).
The course writes a 4-bit register's contents as Q3 Q2 Q1 Q0, with Q3 (the MSB) on the left.
The most basic register loads at every edge. Practical registers add control:
- a load enable to choose when to load and when to hold,
- a synchronous or asynchronous clear to reset to 0,
- shifting, which makes it a shift register.
A CPU is full of registers: the program counter, the instruction register, and the general-purpose registers in its register file.