The logic gates studied so far are combinational — the output depends only on the current inputs. Sequential logic circuits have outputs that depend on both current inputs AND the circuit's past state (memory). Flip-flops are the fundamental building blocks of sequential logic.
A flip-flop is a bistable circuit — it has two stable states (0 and 1) and can store one bit of information. It retains its state until a clock pulse or input causes it to change.
The D-type flip-flop (Data flip-flop or Delay flip-flop) is the most commonly examined sequential circuit at A Level. It has:
Behaviour: On the rising edge of the clock signal (0→1 transition), the flip-flop copies the value of D to Q. Between clock edges, Q holds its last value regardless of changes in D.
| CLK | D | Q (next) | Description |
|---|---|---|---|
| ↑ (rising edge) | 0 | 0 | Q becomes 0 |
| ↑ (rising edge) | 1 | 1 | Q becomes 1 |
| No edge (0 or 1) | X | Q (unchanged) | Holds previous value |
The key equation: Q(next) = D — the output simply follows the input, but only at the clock edge.
This timing diagram shows how Q responds to D and CLK (rising-edge triggered):
Key observations from the timing diagram:
The D-type flip-flop is edge-triggered — it responds only at the moment of a clock edge (rising or falling). This is in contrast to a latch which is level-triggered (responds whenever the enable signal is high). Edge triggering is more precise and eliminates timing hazards.
A single D-type flip-flop stores 1 bit. An 8-bit register is built from 8 D-type flip-flops sharing the same clock, each holding one bit. The CPU's general-purpose registers, accumulator, program counter, and status register are all built from flip-flops.
D-type flip-flops can be connected in series (with Q̄ fed back to D) to form a binary counter. Each flip-flop divides the clock frequency by 2. A chain of n flip-flops forms an n-bit counter (0 to 2ⁿ−1).
Chaining flip-flops so that the Q output of one feeds the D input of the next creates a shift register. Data moves along the chain one position per clock cycle. Used in serial-to-parallel and parallel-to-serial conversion (e.g. USB to internal bus).
Static RAM (SRAM) cells are built from flip-flop circuits. Each bit of cache memory or a CPU register corresponds to one flip-flop.
When all flip-flops in a circuit share the same clock signal, the circuit is synchronous — all state changes occur simultaneously at each clock edge. This is the standard in modern digital design. An asynchronous circuit has no shared clock — components change state as soon as their inputs change, which can cause timing hazards (glitches).
8 questions · 22 marks · instantly marked
| Term | Definition |
|---|