Home › Lessons › Digital logic › 4-bit ripple counter

4-bit ripple counter

Digital logic · Beginner · about 10 minutes · part of Zen’s Electronics Design Mastery

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.

4-bit ripple counter: the circuit on the simulator's bench

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.

stepQ3 Q2 Q1 Q0count

It rolls over from 15 back to 0. Q3 runs at 1/16 of the clock: 125 mHz.

Try it on the bench

  1. Watch the display count 0, 1, 2 … F, then roll over to 0.
  2. Flip switch 1 (RUN / CLEAR) off: all four flip-flops clear to 0. Flip it on to count again.
  3. 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

In the course

Zen’s Electronics Design Mastery, module “Digital Electronics”.

More on digital logic