4-bit Johnson counter: build and simulate it online

A shift register whose last inverted output feeds the first: 8 states from 4 flip-flops.

Build the 4-bit johnson counter in the free online simulator — it checks your circuit automatically.

What you need

  • 1 logic switches labelled CLK
  • 4 probes labelled Q0, Q1, Q2, Q3
  • 4 D flip-flops

Step by step

  1. Inputs and outputs. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Switch CLK; Probes Q0, Q1, Q2, Q3
  2. Four D flip-flops in a ring. Q0 → D1, Q1 → D2, Q2 → D3, and Q̄3 (QN of the last) → D0.
  3. Prove it. It fills with 1s, then with 0s: 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000.

Expected sequence

#inputsclockQ0Q1Q2Q3
1—↑1000
2—↑1100
3—↑1110
4—↑1111
5—↑0111
6—↑0011
7—↑0001
8—↑0000

Frequently asked questions

How do you build a 4-bit johnson counter?

A shift register whose last inverted output feeds the first: 8 states from 4 flip-flops. In short: inputs and outputs, then four d flip-flops in a ring, then prove it.

How does a 4-bit johnson counter behave clock by clock?

It is checked over 8 steps: 1000, 1100, 1110, 1111, …. The table on this page shows the expected Q0, Q1, Q2, Q3 after each clock.

What parts do you need for a 4-bit johnson counter?

4 D flip-flops — plus logic switches for the inputs and probes for the outputs.

Can I simulate a 4-bit johnson counter online for free?

Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every clock cycle is simulated and marked for you. No download or sign-up needed.

Part of DSD 37 · Ring and Johnson counters in the free BitForBytes digital system design course.

More counters & registers builds