# Why use JK flip flops when D flip flops are simpler?

To the best of my knowledge, We can do everything that a JK flip flip can with a D flip flop. So what is the need for the JK flip flop which has a more complex excitation table and more inputs?

I'm sure there must be some applications where D flip flops won't do, otherwise JK flip flop wouldn't have been invented. I would be grateful if you could let me know.

• You know JK has two (data) inputs while D has just one? Also, have you heard about T-flipflop? Commented Feb 12, 2018 at 18:01
• I have. And a D (also, a T) FF can do everything a JK FF can. What I'm curious about is why we need different kinds of FFs when we can convert one into another with basic gates. Commented Feb 12, 2018 at 18:04
• Why do we need flipflops at all? We can just use plain gates. Or transistors. It's about the abstraction. These units have well-defined behavior making it easy to integrate and analyze as whole. Commented Feb 12, 2018 at 18:06
• If you do FPGA work, every flip-flop will be a D flip-flop. But studying the other kinds gives you a toolbox full of other types to build with that external logic. Commented Feb 12, 2018 at 18:07
• Also, D ff's are easier to use than JK ff's, but count up how many transistors it takes to make each kind and if you're designing an ASIC you might now choose to use JK when it does the job you need done. Commented Feb 12, 2018 at 18:09

The simplest answer is that D flip-flops are MORE complicated than JKs. Logically, a D FF is a JK FF with an extra inverter between the J and K inputs, like so

simulate this circuit – Schematic created using CircuitLab

while converting a D to a JK requires much more logic (which I am too lazy to draw out. Trust me.)

so conceptually a JK is simpler by one gate. Of course, this may not be reflected in actual transistor count, but I'm not an expert on IC design.

And while it's true that the two can be made equivalent with some extra gates, some logic functions require fewer external gates depending on the desired function. It all depends.

If your underlying question is, "Why do they make us study JK flip-flops when D FFs are simpler?" the answer is that JK FFs are more versatile, specifically because of the more complex logic table.

And finally, you have the historical sequence wrong. JK flip flops were produced before D types due to their more general nature. For instance, in the classic 7400 TTL series the first flip flop is the 7470, a gated JK. The first D type is the 7474, although eventually that eclipsed other types.

The JK flip flop evolved from the SR latch to give a general purpose synchronous element. Understanding the evolution SR latch JK Flip Flip JK master slave is valuable in teaching principles.

Its rich input choices were valuable back in the days when putting logic on the input involved wiring individual pins of gates in a TTL package together to make a logic function. In some cases this cost could be avoided or simplified by making use of the JK truth table.

Today creating logic functions has little or no cost using devices from EPLDs to ASICs. So one simple logic element the D flip flop is all that is needed.

• In these days the JK was a complex logic block; things like decade counters were in the future. Consequently it was difficult to design logic for (say) a divide-by-7 function; the JK's truth table could eliminate many gates. (See "Gateless scalers with JK Flipflops - Neeteson") Commented Feb 13, 2018 at 11:28

A very simple example- compare the logic gates required for a multi-bit synchronous counter made with ordinary D flip flops vs. J-K flip flops. Ex-or gates are more complex than AND gates.

The FPGA chip I'm working with atm has D flip flops with a clock enable input, which are as good as J-K for this purpose.

• But Sir, the counter can be more easily constructed with T flip flops. Why use JK flip flops at all? I've only started learning about these things and I find JK flip flops difficult. Commented Feb 12, 2018 at 18:46
• J-K is a more general type. You can tie J and K together and get a T flip-flop. Commented Feb 12, 2018 at 18:55
• @SajidHasanApon, where do you have difficulty with the JK FF? Commented Feb 12, 2018 at 19:28