Sequential Circuits
Sequential Circuits
Memory Elements
Present State Clock Next State
Combinational Logic
Input Signals Output Signals
CLR
S 0 0 1 1
R Q 0 Q 1 0 0 1 1 X K Q 0 Q 1 0 0 1 1 !Q
Q Q 0 0 0 1 1 0 1 1 Q Q 0 0 0 1 1 0 1 1
S 0 1 0 X
R X 0 1 0
JK Flip-Flop
SET
CLR
J 0 0 1 1
J 0 1 X X
K X X 1 0
D Flip-Flop
SET
D Q 0 0 1 1
Q Q D X 0 0 X 1 1
CLR
T Flip-Flop
D T
SET
T 0 1
Q Q !Q
CLR
Q Q 0 0 0 1 1 0 1 1
T 0 1 1 0
State Diagram
Determine the State Table Minimize the number of states Assign binary codes to each state Determine the number of flip-flops needed and
1/1 C
1/1 D 1/0
0/1
State Coding
Present State A B C D Code 0 0 1 1 0 1 0 1
Flip Flops
We require two JK flip-flops. Lets name them JKA and JKB
State Table
Present State A B C D Next State X=0 X=1 A B A C A D A D Output Z X=0 X=1 1 1 1 1 1 1 1 0
Excitation Table
QA 0 0 0 0 1 1 1 1 QB 0 0 1 1 0 0 1 1 X 0 1 0 1 0 1 0 1 QA 0 0 0 1 0 1 0 1 QB 0 1 0 0 0 1 0 1 JA 0 0 0 1 x x x x KA x x x x 1 0 1 0 JB 0 1 x x 0 1 x x KB x x 1 1 x x 1 0 Z 1 1 1 1 1 1 1 0
J A XQ B
KA
X\ QA QB 0 1 00 X X 01 x x 11 1 0 10 1 0
KA X
JB
X\ QA QB 0 1 00 0 1 01 x x 11 x x 10 0 1
JB X
KB
X\ QA QB 0 1 00 x x 01 1 1 11 1 0 10 X X
K B X Q A XQ A
Z
X\ QA QB 0 1 00 0 0 01 0 0 11 0 1 10 0 0
Z XQAQB
Present State A B C D E F G
Output X=1 0 0 0 1 1 1 1
Present State A B C D E F
Output X=1 0 0 0 1 1 1
States D and F are equivalent State reduction => state F will be replaced by D
Present State A B C D E
Output X=1 0 0 0 1 1
By reducing the number of states, the number of flip-flops and amount of combinational circuitry needed to implement this sequential circuit could have decreased, reducing the cost of the circuit. However in this example the number of flip-flops remains the same.
States A B C D E
Assign. 1 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1
Assign. 2 0 0 0 0 1 0 0 1 1 1 0 1 1 1 1
Assign. 3 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1
4.7 Homework
Having the following state table, design the sequential circuit following state assignment 1, 2 and 3, respectively. Present State A B C D E Next State X=0 A C A E A X=1 B D D D D X=0 0 0 0 0 0 Output X=1 0 0 0 1 1