4-bit ripple counter
Four JK flip-flops in toggle mode (J = K = 1), each clocked by the previous one’s Q. Every stage toggles at half the rate of the one before, so together they count 0 to 15 in binary. Each stage waits for the one before it, so the change ripples along.

Open this lesson in the labFree, in your browser, no account needed.
How it works
Q0 toggles on every falling clock edge, Q1 whenever Q0 falls, and so on. Count = 8·Q3 + 4·Q2 + 2·Q1 + Q0.
| step | Q3 Q2 Q1 Q0 | count |
|---|
It rolls over from 15 back to 0. Q3 runs at 1/16 of the clock: 125 mHz.
Try it on the bench
- Watch the display count 0, 1, 2 … F, then roll over to 0.
- Flip switch 1 (RUN / CLEAR) off: all four flip-flops clear to 0. Flip it on to count again.
- Set the clock to 100 Hz and pin a mini-scope on U2: each Q is a square wave at half the frequency of the one before.
Parts on the bench
- Bench power supply
- DIP switch module
- Clock / pulse generator
- 2 × 74xx107
- Hex display (decoded)
In the course
Zen’s Electronics Design Mastery, module “Digital Electronics”.