Design a simple state machine

states 135

The time interval is 1 second.

When the switch is enabled the states increase as far as they can

When the switch is disabled, the states decrease as far as they can

  1. How many states are there? ___ how many bits are needed to represent each state? _____
  2. How many different possible transitions are there? ___ how many bits are needed to represent the transitions? ______
  3. What is the largest output? _____ How many bits are needed to display it? ______

Fill in the state transition table

                 
  present state input next state output
  msb lsb msb lsb msb   lsb
s0                
s0                
s1                
s1                
s2                
s2