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

4-Bit Custom Counter: Complete State Transition Diagram

HardLogic CircuitAnalyze

Complete state transition diagrams are the definitive tool for verifying counter correctness in silicon. They reveal all lockup states, recovery paths, and cycle lengths in a single view.

The circuit below is a custom 4-bit synchronous counter using D flip-flops. The state vector is defined as Q3 Q2 Q1 Q0. The excitation equations for the next state logic are:

D3 = Q2 D2 = Q1 D1 = Q0 D0 = Q3' Q2'

The intended valid count sequence begins at state 0000.

Compute the next state for all 16 possible configurations. Map the complete directed graph of state transitions. Identify the length of the valid cycle, locate any invalid state cycles, and determine if uninitialized states safely recover.

Constraints

  • All flip-flops are synchronous and share the same positive-edge-triggered clock.
  • The notation Q3' indicates the logical NOT of signal Q3.
  • State values in text questions should be provided in binary format (e.g., 0101) unless decimal is explicitly requested.

Topics

sequential-logiccountersstate-machines

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