CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

Johnson Counter: Q Feedback Instead of Q_bar Debug

MediumLogic CircuitDebug

A 4-bit Johnson counter produces an 8-state fill-drain sequence and is commonly used in digital design for glitch-free state machines and clock dividers. The sequence is generated by feeding the inverted output of the last flip-flop back to the input of the first flip-flop.

Expected behavior:

| Cycle | Q3 | Q2 | Q1 | Q0 | |-------|------|------|------|------| | Reset | 0 | 0 | 0 | 0 | | 1 | 0 | 0 | 0 | 1 | | 2 | 0 | 0 | 1 | 1 | | 3 | 0 | 1 | 1 | 1 | | 4 | 1 | 1 | 1 | 1 | | 5 | 1 | 1 | 1 | 0 | | 6 | 1 | 1 | 0 | 0 | | 7 | 1 | 0 | 0 | 0 | | 8 | 0 | 0 | 0 | 0 |

Simulation shows that when initialized to 0000, the counter remains at 0000 indefinitely instead of filling with 1s. When forced into a state like 1000, the waveform shows a period of 4 with a one-hot sequence, exhibiting ring counter behavior rather than the expected 8-state fill-drain sequence.

Inspect the circuit and correct the fault.

Constraints

  • Do not alter the clock or reset distribution networks.
  • Keep the shift register structure intact: Q0 shifts to Q1, Q1 to Q2, and Q2 to Q3.

Topics

counterdebugsequential-logicshift-registers

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks