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

Discussion in 'General Electronics Chat' started by JetBlue, Mar 19, 2016.

  1. JetBlue

    Thread Starter New Member

    Nov 27, 2014
    13
    1
    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?
     
  2. JetBlue

    Thread Starter New Member

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

    [​IMG]
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,016
    3,235
    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.
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    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
     
  5. JetBlue

    Thread Starter New Member

    Nov 27, 2014
    13
    1
    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).

    [​IMG]

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

    Moderator

    Mar 31, 2012
    17,750
    4,797
    A purchased DFF is internally very different than a JKFF -- they don't just take a JKFF and add an inverter.

    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.
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,750
    4,797
    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.

    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.
     
Loading...