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

Mod-10 Counter: Synchronous Reset Decode

MediumLogic CircuitBuild

Binary-Coded Decimal (BCD) arithmetic blocks and digital clocks rely on counters that wrap at strict decimal boundaries. The atomic element for these systems is a 4-bit counter that increments from 0 to 9 and synchronously resets to 0.

The circuit takes a 1-bit clock clk, a 1-bit active-high synchronous reset rst, and a 1-bit active-high enable en. It drives a 4-bit output Q. When en is high, Q increments on the rising edge of clk. Upon reaching state 9 (1001), the counter must wrap around to 0 (0000) on the next clock edge.

| Current Q | en | rst | Next Q | |---|---|---|---| | X | X | 1 | 0000 | | X | 0 | 0 | Q (hold) | | 0000 to 1000 | 1 | 0 | Q + 1 | | 1001 | 1 | 0 | 0000 |

Constraints

  • Use only standard D flip-flops and combinational logic gates.
  • Implement the design as a fully synchronous circuit triggered by the rising edge of clk.
  • Do not use asynchronous reset pins on the flip-flops to handle the mod-10 wrap condition.

Topics

BCDSynchronous ResetCounters

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