Flip-flops and counters: circuits that remember

So far every output depended only on the inputs right now. Add a flip-flop and the circuit gains memory: its output also depends on what happened before.

  1. A clock (CLK) keeps flipping between 0 and 1 — press ▶ at the bottom to start it.
  2. A D flip-flop copies D into Q at the instant CLK goes from 0 to 1; the rest of the time Q holds.
  3. A T flip-flop with T=1 toggles on every rising edge, halving the frequency.

Chain a few T flip-flops (each Q into the next CLK) and the outputs count 0, 1, 2… 7 — a counter. Open the example below, press ▶, then switch to the Timing tab to watch each bit follow the clock.

For more complex behaviour, try the state machine designer in the Tools menu: draw states and transitions and it builds the circuit for you.

Open the example in Norro: 3-bit counter

← Learn