Codiode

Counter: Two Separate Invalid State Cycles

HardLogic CircuitAnalyze

Robust digital systems must recover gracefully from random power-on states or radiation-induced bit flips.

A synchronous 4-bit counter uses state variables Q3, Q2, Q1, and Q0 to implement a standard BCD decade sequence from 0 to 9. The next-state logic produces the valid sequence perfectly, but the unused states (10 through 15) exhibit unintended transition behavior. The transition logic dictates the following mappings for the invalid states: 10 transitions to 12, 12 transitions to 14, 14 transitions to 10, 11 transitions to 13, 13 transitions to 15, and 15 transitions to 11.

Analyze the state transition behavior for all 16 possible states. Determine the topology of the unused states and identify the necessary logic to guarantee self-correction to the valid sequence.

Constraints

  • Valid states are 0 (0000) through 9 (1001).
  • State variables are ordered Q3 (MSB) down to Q0 (LSB).
  • States 10 through 15 are considered invalid.

Topics

sequential-logiccountersstate-machinesself-correction

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.

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.

Part of Counters

Problem 116 of 139 in the Counters track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.