one flip flop per state

Discussion in 'Homework Help' started by full, Dec 27, 2014.

  1. full

    Thread Starter Member

    May 3, 2014
    225
    2
    hello everyone

    I did problem for change ASM chart to one flip flop per state

    I don't know how connect output in one flip flop per state please show me how I can connect output in one flip flop?

    thanks
     
    • 1.jpg
      1.jpg
      File size:
      303.4 KB
      Views:
      64
    • 2.jpg
      2.jpg
      File size:
      270.1 KB
      Views:
      50
    Last edited: Dec 27, 2014
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Normally, if you only have four states, you can get by with using only 2 flip-flops. 2^2=4.

    With four states, you could arbitrarily number them S0, S1, S2, and S3. Suppose you call the two flip-flops X and Y. Most designers just encode the states into the binary number created by using this convention: n= 2*X + Y, so now you can refer to Sn, so for S3, X=1 and Y=1, for S2, X=1 and Y=0, and so on...

    Note that by doing it this way, the state machine begins to look like a simple two-bit binary counter...

    If you use one FF per state, with four states, you have created a state machine with 2^4=16 possible states. If only using four of the 16, what happens if the machine accidentally gets into one of the 12 non-used states?
     
    Last edited: Dec 27, 2014
  3. WBahn

    Moderator

    Mar 31, 2012
    17,723
    4,788
    You do it the same way you would if you were using 2 FFs. You make a transition table that reflects what values you want each of the FFs to take on in response to the inputs and for each possible present state. As MikeML warns, you need to decide what to do with all of the unused states. At first glance, you might just make them don't cares, but in practice this is not the way to do it for just the reason MikeML states.

    BTW, this is called One-Hot encoding.
     
  4. full

    Thread Starter Member

    May 3, 2014
    225
    2
    your idea for draw logic circuit using D flip-flop not for one flip flop per state
    please see this PDF , I want know how I can connect output?
     
  5. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hello full

    Apparently, for all the messages that have been generated, you want to make a ring counter.

    However in post #4 You say:
    I want know how I can connect output?

    What output. ??. . . there are several of them.
     
  6. full

    Thread Starter Member

    May 3, 2014
    225
    2
    from S1 to S2
    3.PNG
     
Loading...