Codiode

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.

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.

Part of Counters

Problem 5 of 139 in the Counters track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.