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

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

EasyLogic CircuitBuild

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.

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