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

Up/Down Counter: Underflow Detection Missing Debug

HardLogic CircuitDebug

Cascaded down-counters rely on a borrow out signal to trigger the next stage when decrementing past zero. A 4-bit up/down counter must assert the BOUT signal when the current count is 0000 and the count direction signal DOWN is active.

Expected behavior:

When DOWN is 1 and the count state Q3, Q2, Q1, Q0 is 0, 0, 0, 0, the output BOUT must be 1. For all other states during a countdown, BOUT must be 0. When DOWN is 0, BOUT must always be 0.

Simulation shows a failure during the countdown sequence. As the counter passes through states 0001, 0000, and 1111, the BOUT signal remains 0. Inspect the circuit and correct the fault.

Constraints

  • Do not modify the sequential logic or flip-flops.
  • Only correct the combinational logic driving the BOUT output.
  • The counter must maintain standard positive-edge triggered behavior.

Topics

debugsequential-logiccountersunderflow

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