# How to design a binary up down counter using D flip flop's and the 'up' or 'down' count will be controlled by another flip flop?

I have to design a 4bit Binary Up Down counter using D flip-flops . But here is the catch I cannot directly use a switch to control whether the counter will count up or down, I have to do that using a D flip flop. Any help on how I can solve this?

N.B. I can design an up down counter , but I need to know how to use another D flip flop to control the whether I want up or down count

• Do you know how to design the up or down counter alone? Commented Jul 26, 2017 at 17:59
• yes I do , I just need to know how to use the D flip flop as a switch Commented Jul 26, 2017 at 18:02
• What will control the d type that you want to function as a switch? Commented Jul 26, 2017 at 18:07
• I need help on how to implement the new d flip flop into the circuit, I am not getting any clue on how to use this new flip flop :/ Commented Jul 26, 2017 at 18:09
• Until you know what "thing" or "action" sets up or down counting, you cannot proceed. Commented Jul 26, 2017 at 18:16

Without knowing exactly what "using a D flip flop" means, I can provide at least two approaches.

First, instead of a single switch, you can provide two - an up/down switch and a "load control" switch. Using an NO switch operating on the open-to-close action for the control switch can be done by

simulate this circuit – Schematic created using CircuitLab

But keep in mind that I have provided no debouncing on the clock switch, which you must provide.

Alternatively, if you want the control FF driven by the same clock which drives the counter, you can do it but you have to delay the clock between the control FF and the counter in order to allow a change in the control input to settle before the counter acts on it.

simulate this circuit

Note that a pair of inverters makes a perfectly usable delay, and multiple pairs of inverters make for longer delays.