The Register: a Byte of Flip-Flops

The twelfth intro scales the D flip-flop up to a byte. The experiment uses a REG block and eight data lamps.

Experiment: the register remembers a byte

The eight lamps on the left are a data byte. Turn on the "4" and "1" lamps (that makes 5) and press WRITE: the REG block remembers the number and shows it on the right. Now change the lamps however you like — REG will not move by a single bit on its own.

The rule: eight flip-flops, one byte

A register is eight D flip-flops sharing one clock. Each flip-flop holds its own digit, and all eight update simultaneously on the WRITE press. Eight digits give numbers from 0 to 255, and they are captured in one press, not bit by bit.

Transfer: what is in the register now

The number 7 was written into the register. After the write, the input lamps were switched so the input now reads 9, but no new WRITE press happened. What does the register show? Seven: writing happens only on the edge, and until the next edge the register holds what was written — that is memory.

Where it is used

Registers are the processor's working hands: they hold the numbers while they are being computed. On this level you will build a register from eight D flip-flops, and in the processor (levels 16+) the accumulator register holds the result of every ALU operation.

Take the intro in the game · Level 12 guide · All intros