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

Ripple Counter with Asynchronous CLEAR

MediumLogic CircuitBuild

Real-world hardware requires a reliable method to reset to a known state on power-up or during a system fault without waiting for the next clock edge. A 4-bit ripple counter with an asynchronous clear achieves this by instantly driving all state bits to zero the moment the reset line is asserted.

Construct a 4-bit up-counter using cascaded flip-flops. The counter increments its 4-bit output Q on every falling edge of CLK. When the active-low CLR_bar input is driven to 0, all bits of Q must become 0 immediately, completely independent of the CLK state. When CLR_bar is 1, the counter resumes normal operation.

| CLR_bar | CLK | Q (current) | Q (next) | |-----------|-------|---------------|------------| | 0 | X | X | 0 | | 1 | ↓ | N | N + 1 | | 1 | 1/0/↑ | N | N |

Constraints

  • Use exactly four flip-flops configured to toggle.
  • Connect the CLR_bar input to the asynchronous clear port of every flip-flop simultaneously.
  • Do not use synchronous reset logic in the data path.
  • Output Q must be a 4-bit bus.

Topics

Sequential LogicFlip-FlopsCounters

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