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
Fill in the state transition table
present state | input | next state | output | |||||
msb | lsb | msb | lsb | msb | lsb | |||
s0 | ||||||||
s0 | ||||||||
s1 | ||||||||
s1 | ||||||||
s2 | ||||||||
s2 |