JK Flip flops

Discussion in 'Homework Help' started by thexy, Dec 13, 2015.

  1. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Hello everyone. I have little test soon so I need help. How to do this example? I don't need only results, I would like if someone could explain me. We have two input variables J and K and one output Q.

    ger.PNG
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    You need to provide YOUR best attempt to solve it. Even if it's just a review for a test. You've almost certainly been shown this stuff before but something didn't click. So you need to fight with it a bit because having someone show you again probably still won't make that something click.

    Your diagram is confusing (but that may just be a matter of a different style of presentation than I am used to).

    It appears that you have two states and usually we use the letter 'Q' to indicate the state. But the diagram is for a Mealy machine and the Legend indicates that Q is just an output, but not a system state. I'm guessing that you use 'Z' for the system state variable. We can work with that, but be prepared for some responders to confuse the output Q with state variable.
     
  3. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Oh your reply didn't help me. I have watched tutorials but on my uni they do it on different way so now I have no idea how to do it. This diagram is from previous tests. I would be really thankful if someone cold help me.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,792
    For any state belonging to the set {A, B}, a JK flip-flop will only do one of four things. It will:
    1. Set the output to 0
    2. Set the output to 1
    3. Hold the present output
    4. Toggle the present output to the opposite state. eg. 1→0, or 0→1
    Your task is to figure out which combination of inputs performs which function. Each of the arcs in the diagram is labeled with the JK input pair, followed by a slash followed by the output value Q. This is a Mealy machine because the output depends on the transition. If the output was only a function of the state, then it would be a Moore machine. Got it?

    Note: Z_alt must be the present state, and Z_neu must be the next state.

    BTW -- Extra credit if you can show the Moore machine diagram or explain why you can't.
     
    Last edited: Dec 13, 2015
  5. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    No.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    Look at your diagram. If Z_alt = A, J=0, and K=0, what does the diagram indicate that Z_neu will be? What does the diagram indicate that Q is? Does this allow you to fill in the first column of your table? If so, then just apply this to each column of the table in turn.
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,792
    Then I don't know how to help you if the state diagram does not make any sense to you.
     
  8. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Is in first Q=0 and zneu=1
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    Z (both Z_alt and Z_nue) can only take on values of 'A' or 'B'.

    At some point you will need to define your state variables in terms of how they will be represented within the implementation, but at the level of this diagram and table that is not indicated.
     
  10. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Hm, so if J and K are 0, than my Z and Q are both 0 or?
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    Again, Z can only take on values of 'A' or 'B'. It cannot take on the value of 0 because that has no defined meaning. So use either 'A' or use 'B' for Z_neu. Nothing else.
     
  12. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,792
    The value of Z must belong to the set {A, B}. Do you see a 0 or a 1 inside the curly braces?
     
  13. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Oh, I get it now. So first Z will be A, but what about Q?
     
  14. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    What does the diagram tell you:

    SM.png
     
  15. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    that Q is 0
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    Correct.

    Now see if you can fill in the entire table.
     
  17. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Q is 0010 1101 but not sute what Z new should be, can you help me with that? Is that aaaa bbbb?
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    Your Q is almost correct.

    For Z_neu, just look at what state (value of Z) the arrow is pointing toward.
     
  19. thexy

    Thread Starter Member

    Dec 13, 2015
    126
    0
    Almost? Can you correct my mistake. Is it 0010 1011? Is Z neu than aabb baba?
     
  20. WBahn

    Moderator

    Mar 31, 2012
    17,760
    4,800
    YES!

    You got it -- and notice that we never showed you any part of the answer. At most we told you that you had a problem and left it up to you to find it.

    Good job!
     
    Papabravo likes this.
Loading...