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

Johnson Counter: Non-Glitchy Decoded Output During Transition

MediumLogic CircuitTiming Diagram

A 4-bit positive-edge-triggered Johnson counter shifts its state rightward on every LOW-to-HIGH transition of CLK, with the first stage Q3 receiving the inverted output of the last stage Q0.

Four signals are provided: CLK (clock, period 2), and the first three state bits Q3, Q2, and Q1.

Trace the final state bit Q0 across all 12 time steps, assuming an initial value of 0. Additionally, trace two combinational decode signals based on the counter bits: DEC3 (defined as Q1 AND ~Q0) and DEC4 (defined as Q3 AND Q0).

Constraints

  • Q0 captures the value of Q1 at every rising edge of CLK and holds it until the next rising edge.
  • DEC3 and DEC4 are purely combinational and must be evaluated at every time step based on the current values of their respective inputs.
  • A valid Johnson counter state transition changes exactly one bit, guaranteeing glitch-free outputs for 2-input decode gates.

Topics

TimingCountersState MachinesDecoding

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