Codiode

4-Bit Ripple Counter from D Flip-Flops Wired as Toggle

EasyLogic CircuitBuildFree

Most practical integrated circuit counters are built internally from D flip-flops rather than dedicated toggle elements. Converting a D flip-flop into a toggle element is a fundamental wiring idiom required to build larger asynchronous counting structures.

Construct a 4-bit asynchronous up-counter that increments its value on each falling edge of the input clk. The outputs Q3, Q2, Q1, and Q0 represent the 4-bit count value, with Q0 as the least significant bit.

clk edge Q3 Q2 Q1 Q0
Initial 0 0 0 0
1st Fall 0 0 0 1
2nd Fall 0 0 1 0
3rd Fall 0 0 1 1
4th Fall 0 1 0 0

Constraints

  • Use exactly four D flip-flops.
  • Do not use dedicated T flip-flops or pre-packaged counter blocks.
  • Wire the inverted output of each stage back to its own data input to create the toggle behavior.
  • Chain the stages asynchronously so the appropriate output of one stage clocks the next.

Topics

D Flip-FlopRipple CounterCountersToggle

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.

Free to solve. A Codiode account keeps your progress.

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 2 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.