How to build a 4-bit synchronous direct counter using only D Flip-Flops?

counterflipflop

I have to build a counter using only D Flip-Flops and wires. What's the approach?

Best Answer

D Flip-Flops are great for applications like counters because they "remember" their own states. They are sequential based components instead of combinational.

enter image description here

As you can see in the picture, for each bit, a D Flip-Flop is required.

NOT Q loops back to D; the CLK goes to the LOAD of the first Flip-Flop. Q goes to the bit counter and to the LOAD of the next Flip-Flop in the sequence.

How it works is this:

The counter is cleared. CLK goes high, the output of Q is '0' so the output of NOT Q is '1'. Since NOT Q is connected to D, the Flip-Flop gets loaded with '1'. The output of Q is now '1'. '1' is to LOAD the next Flip-Flop and the process simply continues.