For the circuit seen here, is this a valid alternative?

Thread Starter

JetBlue

Joined Nov 27, 2014
13
For the JK flip flop circuit seen in Vol 4 > Sequential Circuits > Finite State Machines, is the following a valid alternative:

Simply mirror the D flip flop circuit shown earlier, and then what you would pass to D you pass to J. And to K you pass not(D).

Seems much simpler. Yes you use two additional not gates but other than that I see no downsides.

What do you think?
 

Thread Starter

JetBlue

Joined Nov 27, 2014
13
For reference, the JK flip flop's truth table below. Highlighted is the part almost identical to a D flip flop.

 

crutschow

Joined Mar 14, 2008
25,247
I'm not sure I understand what you are asking(?).
If you want to make a D FF act as a JK, then you need to have it meet all the JK truth table states, including that it toggles when both J and K are high.
Just two additional gates won't do that.
 

AnalogKid

Joined Aug 1, 2013
8,534
Functionally, a D ff is a JK ff with an extra inverter between the J and K inputs. A purchased JK part can be turned into a D circuit by adding the inverter externally. A purchased D part already has the inverter internally. There is nothing you can do at the D input to counteract the effect of the internal inverter and create the full functionality of a JK ff.

ak
 

Thread Starter

JetBlue

Joined Nov 27, 2014
13
Thanks for the replies!

I don't think my question came across clearly. In the article linked, the D flip flop circuit is first derived, then the author goes on to show how the same functionality can be achieved using JK flip flops.

The JK flip flop circuit he derives is quite different from the D flip flop circuit. See the Karnaugh diagrams. It seems to me that a simpler way to go about making the JK flip flop circuit would be to just feed the values that otherwise entered the D inputs to the J inputs, and their inverses to the K inputs... such that the JK flip flop circuit looks identical to the D flip flop circuit except with the addition of two NOT gates (for the K inputs).



@AnalogKid, from your answer looks like this rationale is correct.
 

WBahn

Joined Mar 31, 2012
26,046
Functionally, a D ff is a JK ff with an extra inverter between the J and K inputs. A purchased JK part can be turned into a D circuit by adding the inverter externally. A purchased D part already has the inverter internally.
A purchased DFF is internally very different than a JKFF -- they don't just take a JKFF and add an inverter.

There is nothing you can do at the D input to counteract the effect of the internal inverter and create the full functionality of a JK ff.
Sure you can, but it involves quite a bit more than an inverter. You can take one of {JK, D, T} and turn in into either of the other two. Consequently, any logic that can be implemented using one can be implemented using either of the other two. Like many similar instances, the reason that multiple choices are available is because different problems lend themselves to one more than the others.
 

AnalogKid

Joined Aug 1, 2013
8,534
A purchased DFF is internally very different than a JKFF -- they don't just take a JKFF and add an inverter.
That's why I said "Functionally...:
You can take one of {JK, D, T} and turn in into either of the other two.
I don't think so. Again, functionally... A D ff is a special case of a JK, and a T ff is a special case of a D. Without using the Set and Reset inputs, I see no way of adding external circuits to the D input that give the overall system true JK functionality. And it would be even harder to do that with a T ff.

Using the truth table in post #2, I agree that you could add a bunch of gates around a D ff so that no matter what the current Q and -Q states are, they would be the same after the next clock. This would emulate the first row of the table. But that external circuitry would make it impossible for the ff to perform any of the next three rows.

ak
 

WBahn

Joined Mar 31, 2012
26,046
I agree that, functionally, a DFF is a JKFF with an inverter added. But as soon as you say that a "purchased DFF" is just a JKFF with that inverter added internally, you are not talking about functionality -- you are saying that when you purchase a DFF that you getting JKFF with an inverter added internally.

I don't think so. Again, functionally... A D ff is a special case of a JK, and a T ff is a special case of a D. Without using the Set and Reset inputs, I see no way of adding external circuits to the D input that give the overall system true JK functionality. And it would be even harder to do that with a T ff.
For this to be the case, you HAVE to be claiming that there are Moore machines that cannot be implemented using D-type flip flops.

Proof:
Q1) If I tell you what the current state of a JKFF is, can you tell me what the current output is?
Q2) If I tell you what the current state of a JKFF is and the currents value of the J and K inputs are, can you tell me what the next state will be?

If the answer to both questions is Yes, then a JKFF is a Moore machine. If it cannot be implemented using DFFs, then there exist Moore machines for which DFF-based implementations do not exist.

What if I asked you to implement the following truth table for three inputs (A, B, C) and one output (Y)

A | B | C | Y
0|0|0|0
0|0|1|1
0|1|0|0
0|1|1|0
1|0|0|1
1|0|1|1
1|1|0|1
1|1|1|0

Could you do it?

If so, then take this combinatorial circuit and a DFF and put them in a black box having inputs J and K and outputs Q and Q'. Connect J to A, K to B and, from the DFF outputs, connect Q to Q and Q' to Q'. Finally, Then connect Q from the DFF to C and Y to D. You know have a JKFF implemented using a DFF.

Notice that no use was made of any set/reset inputs -- the DFF doesn't even have to have any such inputs.
 
Top