Simple question about Finite State Machine

Discussion in 'Homework Help' started by lucas3003, Jun 12, 2015.

  1. lucas3003

    Thread Starter New Member

    Jun 10, 2015
    2
    0
    Hi folks,

    I have been studying the textbook available on this website, and I have a question on Chapter 11 of vol. 4 ( http://www.allaboutcircuits.com/textbook/digital/chpt-11/finite-state-machines/ )

    On step 4 (Building the state table), it showing that, for example, state 00 to 01 produces output 0, state 01 to 00 produces output 1, and state 10 to 10 produces output 0. However, the image right above the table is showing different outputs, and I am a little bit confused with that. Could someone help me to understand?

    Thanks,
    Lucas.
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    What's the problem?

    State 00 is producing an output of 0
    State 01 is producing an output of 1
    State 10 is producing an output of 0

    Isn't that what the diagram show?

    Remember, the output is a function of what state the machine is IN, and NOT of what state it is going to be in NEXT.
     
  3. lucas3003

    Thread Starter New Member

    Jun 10, 2015
    2
    0
    Now I see.

    I was thinking exactly what you said, that the output would be a function of what state is going to be next.

    Thank you for help!
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    The image shows the output (the value under the state label) is 1 while the machine is in state '10'. The table, however shows not just the current state, but the next state as well.

    The table shows what the current output is and what the next state should be. Since there are two possible next states from the '10' state, there are two rows of the table differing in what the next state is, but both agree that the output is 1 while is the '10' state.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    Good.

    The FSM you showed is what is known as a Moore machine, meaning that the current output is a function of the current state only.

    You can also have a Mealy machine, in which the current output is a function of both the current state AND the current inputs. But in no case can the output be a function of the next state because the machine isn't in the next state. If it wants to pretend it is and set its output based on the state that it expects to go into next, then it must do so based on the state it is in and the state of the current inputs (which are how it knows what state it will go to next), which means that it must be a Mealy machine.
     
Loading...