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

Counter: Recovery Within 1 Cycle vs. 2 Cycle Specification

HardLogic CircuitTiming Diagram

Two positive-edge-triggered modulo-6 counters (A and B) normally count from 000 to 101 (0 to 5), but they handle the invalid state 110 (6) differently: Counter A recovers directly to 000 on the next clock edge, whereas Counter B transitions to 111 (7) before recovering to 000 on the subsequent edge.

Eight signals are shown: CLK (clock, period 2) FORCE_6 (synchronous input: when HIGH, forces both counters to 110 on the next rising clock edge) QA2, QA1, QA0 (Counter A outputs, initially 000) QB2, QB1, QB0 (Counter B outputs, initially 000)

Trace all six output signals across 12 time steps to verify their recovery behavior.

Constraints

  • All state transitions are strictly synchronous and occur only on the LOW-to-HIGH transition of CLK.
  • When FORCE_6 is LOW, the counters evaluate their current state to determine the next state.

Topics

sequential-logiccountersstate-recovery

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