McGill University Department of Electrical and Computer Engineering Winter 2011
Course: ECSE 323-Digital Systems Design
ASSIGNMENT #10A Wednesday March. 30, 2011
TOPIC: Finite State Machines State minimization: Use partitioning to reduce the number of states of the following state table: Present State A B C D E F G H
Next State Input X=0 A C C E F E H G
Output Z Input X=1 D D D G C B F H
0 0 0 1 0 0 0 0
Question 1: Derive the resulting minimized state table Question 2: Draw the resulting state diagram.
Solution: P1 = (ABCEFGH)(D) P2 = (ABC)(EFGH)(D) P3 = (ABC)(EF)(GH)(D) P4 = (ABC)(EF)(GH)(D) A=B=C, E=F, G=H State truth table: Present State A E G
Next State Input X=0 A E G
Output Z Input X=1 D G E
0 0 0
D
E
G
1
State diagram:
Question 3: Show that the following state diagram has a minimal number of states.
Solution: P1 = B (AC), consequently => B≠A , B≠C When X=1 (AC) => (BC), consequently A≠C P2=(A)(B)(C)
Question 4: Using the state diagram of Q3, propose an equivalent state diagram that have 6 states. Solution: One of the possible solutions is
Synthesis with JK flip-flops: Question 5: Synthesize the state machine of Q3 using JK flip-flops. Use the following state mapping: A=00, B=01, C=10 Solution: State table: Current State A B C
Next State X=0 A C A
Output Z X=1 B A C
0 1 1
Truth table: Current State A B C D
Next State X=0 J1 K1 0d 1d d0 dd
Output Z X=1
J0 K0 0d d0 0d dd
J1 K1 0d 0d d1 dd
J0 K0 1d d0 0d dd
0 1 1 d
J1 = X’ Q0 K1 = X J0 = X Q1’ K0 = 0 Z = Q0 + Q1
Circuit:
Algorithmic State Machine Question 6: Derive the Algorithmic State Machine from the state machine diagram. Solution: