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

Mod-N Counter: Two Approaches Compared

MediumLogic CircuitAnalyze

Hardware designers must frequently choose between simplified reset logic and strict state adherence when building custom modulus counters.

Two 4-bit Mod-10 (BCD) counters are presented for analysis. Circuit A uses a standard 4-bit binary counter with a synchronous reset tied to a combinational decoder detecting state 1010. Circuit B uses custom excitation logic derived from a next-state table. Both circuits drive a downstream module that strictly requires valid BCD inputs from 0000 to 1001.

Circuit B Next-State Table excerpt:

| Current State (Q3 Q2 Q1 Q0) | Next State (D3 D2 D1 D0) | | :--- | :--- | | 1000 | 1001 | | 1001 | 0000 | | 1010 | Don't Care |

Analyze the state transitions and timing behavior of both circuits to determine which approach satisfies the downstream constraint.

Constraints

  • Both counters are positive edge-triggered.
  • The downstream module fails immediately if an invalid BCD state is sampled on the rising clock edge.
  • All reset signals in Circuit A are synchronous.

Topics

timingcounterssynchronous-logicstate-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