Sheet Five

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Electrical Engineering Department

Module; [13ELEC13C] Digital Design


Sheet 5
Finite State Machines

Sheet five
Finite State Machines

1) Consider the FSM in the figure below.

a. Create the architecture for this FSM


b. Given the following encodings, draw the truth table
(A = 00, B = 01, C = 10, D = 11)
c. Write the equations for the outputs.

2) Given the state table below and the corresponding encoding of the states, design
the FSM.

Present state Next State Outputs (XY)


X=0 X=1
000 000 011 01
001 010 000 11
010 011 100 10
011 100 001 11
100 001 010 00

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

You might also like