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

Mod-9 Counter: 4-Bit Design with Multiple Don't-Cares

HardLogic CircuitBuild

Phase-locked loops and digital frequency synthesizers often require non-binary integer division. A Modulo-9 counter serves as a divide-by-9 element: it completes one full cycle every nine clock pulses.

The counter advances its 4-bit state Q[3:0] from 0 to 8 sequentially on each clock cycle. Upon reaching state 8, the next state must wrap around to 0. A synchronous rst signal forces the state to 0 on the next clock edge. States 9 through 15 are unreachable during normal operation. You must treat these invalid states as don't-cares to minimize the combinational logic feeding the flip-flops.

| rst | Q3 | Q2 | Q1 | Q0 | Q3_next | Q2_next | Q1_next | Q0_next | |-------|------|------|------|------|-----------|-----------|-----------|-----------| | 1 | X | X | X | X | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | 1 | X | X | X | X | | 0 | 1 | 1 | 1 | 1 | X | X | X | X |

Constraints

  • Use exactly four D flip-flops for state storage.
  • Implement minimized sum-of-products equations for the next-state logic.
  • Treat states 9 through 15 as don't-cares in your minimization.
  • Include a synchronous reset rst that clears all flip-flops to 0.

Topics

k-mapssequential-logiccountersstate-machine

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