Page 4

D-type Flip-Flop

A flip-flop is a sequential circuit: unlike a gate or an adder, its output depends on past inputs, so it can store data. The D-type flip-flop holds a single bit and is the basic building block of registers and memory.

AQA note. AQA expects you to know the D-type flip-flop as an edge-triggered 1-bit memory unit; its internal gate-level construction is not assessed. OCR asks for "the logic associated with D-type flip-flops".

Symbol

D CLK Q Q
  • D — the data input (the bit to be stored).
  • CLK — the clock. The small triangle (›) marks it as edge-triggered.
  • Q — the stored output bit.
  • Q — the complement of Q (always the opposite of Q).

"D-type" because the output simply follows the Data input — but only at the moment the clock ticks.

Behaviour

On each rising edge of the clock, Q takes whatever value D currently has. Between clock edges the input D is ignored and Q holds its last value — that is what makes it a memory.

ClockDQ after the edge
↑ rising edge00
↑ rising edge11
no edge (steady)XQ (unchanged)

X means "don't care" — D has no effect unless the clock is changing. Q is simply the inverse of Q in every row.

Why edge-triggering matters

Use in registers

Place n D-type flip-flops side by side, sharing one clock line, and you can store an n-bit value in a single tick — this is a register. CPU registers, buffers and static RAM cells are all built this way, so the D-type flip-flop is the link between simple logic gates and the storage that makes a computer work.

In one line: a D-type flip-flop captures the value of D on a clock edge and holds it until the next edge — a 1-bit, edge-triggered memory cell.