Professional Documents
Culture Documents
Sheet Five
Sheet Five
Sheet Five
Sheet five
Finite State Machines
2) Given the state table below and the corresponding encoding of the states, design
the FSM.
Page 1 of 2
3) Draw a state machine that can detect when it has received the serial input
sequence 01010.
4) Design an FSM with one input, A, and two outputs, X and Y. X should be 1 if A
has been 1 for at least three cycles altogether (not necessarily consecutively). Y
should be 1 if A has been 1 for at least two consecutive cycles.
Show your state transition diagram, encoded state transition table, next state and
output equations, and schematic.
5) Draw a state diagram for an FSM that has an input b and an output Y. Whenever
X changes from 0 to 1, Y should become 1 for two clock cycles and then return to
0 even if X is still1.
6) A wristwatch display can show one of four items: the time, the alarm, the
stopwatch, or the date, controlled by two signals s1 and s0 (00 displays the time,
01 the alarm, 10 the stopwatch, 11 the date – Assume S1S0 control an N-bit wide
mux that passes through the appropriate register). Pressing a button B (which sets
B=1) sequences the display to the next item (if the presently displayed item is the
date, the next item is the current time). Create a state diagram for an FSM
describing this sequencing behavior, having an input bit B, and two output bits S1
and S0. Be sure to only sequence forward by one item each time the button is
presses, regardless of how long the button is presses – in other words, be sure to
wait for the button to be released after sequencing forward one item. Use short but
descriptive names for each state. Make displaying the time be initial state.
Page 2 of 2