Design a simple state machine

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

- How many states are there? ___ how many bits are needed to represent each state? _____
- How many different possible transitions are there? ___ how many bits are needed to represent the transitions? ______
- 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 |