Professional Documents
Culture Documents
Chapter 5 Synchronous Sequential Circuit
Chapter 5 Synchronous Sequential Circuit
Sequential Circuits
Latches
Asynchronous
Inputs
Synchronous Sequential
Logic
SR Latch
Combinational
Circuit
S R Q0
0 0 0
Outputs
Memory
Elements
Q
0
Q
1
Q = Q0
Synchronous
Inputs
Outputs
Combinational
Circuit
Initial Value
Flip-flops
Clock
1
Latches
Latches
SR Latch
S R Q0
0 0 0
0 0 1
Q
1
0
SR Latch
Q = Q0
Q = Q0
Q
0
1
Latches
S
0
0
0
R
0
0
1
Q0
0
1
0
Q
0
1
0
Q
1
0
1
SR Latch
Q = Q0
Q=0
S
0
0
0
0
R
0
0
1
1
Q0
0
1
0
1
Q
0
1
0
0
Q
1
0
1
1
Q = Q0
Q=0
Q=0
Latches
Latches
SR Latch
S
0
0
0
0
1
Q0
0
1
0
1
0
Q
0
1
0
0
1
Q
1
0
1
1
0
SR Latch
Q = Q0
Q=0
Q=1
R
0
0
1
1
0
Latches
S
0
0
0
0
1
1
R
0
0
1
1
0
0
Q0
0
1
0
1
0
1
Q
0
1
0
0
1
1
Q
1
0
1
1
0
0
SR Latch
Q = Q0
Q=0
Q=1
Q=1
S
0
0
0
0
1
1
1
R
0
0
1
1
0
0
1
Q0
0
1
0
1
0
1
0
Q
0
1
0
0
1
1
0
Q
1
0
1
1
0
0
0
Q = Q0
Q=0
Q=1
Q = Q
1
0
Latches
Latches
SR Latch
1
0
S
0
0
0
0
1
1
1
1
Q0
0
1
0
1
0
1
0
1
Q
0
1
0
0
1
1
0
0
Q
1
0
1
1
0
0
0
0
SR Latch
Q = Q0
Q=0
Q=1
S R
SR Latch
Q
Q0
No change
Reset
0
Set
1
Invalid
Q=Q=0
0
0
1
1
0
1
0
1
S
0
0
1
1
Q
R
Invalid
0 Q=Q=1
Set
1
1
Reset
0
0
Q0
No change
1
S R
0
0
1
1
0
1
0
1
Q
Q0
0
1
Q=Q=0
No change
Reset
Set
Invalid
Q = Q
Q = Q
R
0
0
1
1
0
0
1
1
Latches
S R
0
0
1
1
10
0
1
0
1
Q
Invalid
Q=Q=1
Set
1
Reset
0
Q0
No change
11
Controlled Latches
Controlled Latches
C S R
0
1
1
1
1
x
0
0
1
1
x
0
1
0
1
Q
Q0
Q0
0
1
Q=Q
D Latch (D = Data)
D Latch (D = Data)
Timing Diagram
Timing Diagram
Q
t
C D
No change
No change
Reset
Set
Invalid
Controlled Latches
0 x
1 0
1 1
12
Q
Q0
0
1
No change
Reset
Set
C D
Output may
change
0 x
1 0
1 1
13
Q
Q0
0
1
No change
Reset
Set
Output may
change
14
FlipFlip-Flops
FlipFlip-Flops
FlipFlip-Flops
Master-Slave D Flip-Flop
D
C
C
D Latch
(Master)
Edge-Triggered D Flip-Flop
D
C
D Latch
(Slave)
Master
CLK
Q
Slave
CLK
Positive Edge
D
CLK
Positive Edge
Negative Edge
Q
Q
QMaster
Negative Edge
QSlave
Department of Electrical Engineering
15
16
17
FlipFlip-Flops
FlipFlip-Flops
JK Flip-Flop
T Flip-Flop
Q
Q
D = TQ + TQ = T Q
K
Q
Q
Q
18
Q(t+1)
0
1
Reset
Set
K Q(t+1)
0
Q(t)
1
0
0
1
1 Q(t)
No change
Reset
Set
Toggle
Q(t+1)
Q(t)
Q(t)
No change
Toggle
Q
Q
D = JQ + KQ
D = JQ + KQ
D
0
1
19
J
0
0
1
1
T
0
1
20
Q
Q
Q
Q
D
0
1
J
0
0
1
1
Q(t+1)
0
1
K Q(t+1)
0
Q(t)
1
0
0
1
1 Q(t)
T
0
1
Q(t+1)
Q(t)
Q(t)
Analysis / Derivation
Q(t+1) = D
Q(t+1) = JQ + KQ
J
0
0
0
0
1
1
1
1
Analysis / Derivation
K Q(t) Q(t+1)
0 0
0
1
0 1
1 0
1 1
0 0
0 1
1 0
1 1
No change
J
Reset
Set
Toggle
J
0
0
0
0
1
1
1
1
K Q(t) Q(t+1)
0 0
0
1
0 1
1 0
0
1 1
0
0 0
0 1
1 0
1 1
No change
Reset
Set
Toggle
Q(t+1) = T Q
21
22
23
Analysis / Derivation
J
K
Q
Q
J
0
0
0
0
1
1
1
1
Analysis / Derivation
K Q(t) Q(t+1)
0 0
0
1
0 1
1 0
0
1 1
0
0 0
1
0 1
1
1 0
1 1
No change
J
Reset
K
Set
Toggle
J
0
0
0
0
1
1
1
1
Analysis / Derivation
K Q(t) Q(t+1)
0 0
0
1
0 1
1 0
0
1 1
0
0 0
1
0 1
1
1 0
1
1 1
0
No change
J
Reset
Set
Toggle
J
0
0
0
0
1
1
1
1
K Q(t) Q(t+1)
0 0
0
1
0 1
1 0
0
1 1
0
0 0
1
0 1
1
1 0
1
1 1
0
K
0
J 1
1
1
0
0
0
1
Q(t+1) = JQ + KQ
Department of Electrical Engineering
24
25
26
Asynchronous Reset
Asynchronous Reset
R
0
D CLK Q(t+1)
x
x
0
Reset
R
0
1
1
D CLK Q(t+1)
x
x
0
0
0
1
1
PR
D Q
Q
CLR
Reset
Reset
27
28
29
10
Preset
The State
State = Values of all Flip-Flops
Preset
PR
D Q
PR
D Q
CLR
CLR
Reset
0
0
1
1
1
1
1
1
Example
AB=00
Reset
30
31
32
11
State Equations
A(t+1) = DA
= A(t) x(t)+B(t) x(t)
B(t+1) = DB
= A(t) x(t)
= A x
y(t) = [A(t)+ B(t)] x(t)
= (A + B) x
Department of Electrical Engineering
Present
Input
State
Present
State
A
0
0
0
0
1
1
1
1
=Ax+Bx
33
B
0
0
1
1
0
0
1
1
t
x
0
1
0
1
0
1
0
1
Next
State
A
0
0
0
1
0
1
0
1
t+1
B
0
1
0
1
0
0
0
0
Output
y
0
0
1
0
1
0
1
0
t
A
0
0
1
1
t
A(t+1) = A x + B x
B(t+1) = A x
A
0
0
0
0
B
0
0
0
0
A
0
1
1
1
t+1
B
1
1
0
0
y
0
1
1
1
y
0
0
0
0
t
A(t+1) = A x + B x
B(t+1) = A x
y(t) = (A + B) x
B
0
1
0
1
Next State
Output
x=0 x=1 x=0 x=1
y(t) = (A + B) x
34
35
12
Present
State
input/output
AB
0/0
1/0
0/1
00
Next State
x=0
Output
x=1
x=0
x=1
A B
A B A B
0 0
0 1
1 0
1 1
Present
Input
State
A
0
0
0
0
1
1
1
1
10
0/1
01
1/0
11
1/0
JK Flip-Flops
Example:
0/1
1/0
36
x
0
0
1
1
0
0
1
1
y
0
1
0
1
0
1
0
1
Next
State
A
0
1
1
0
1
0
0
1
x
y
D
CLK
Example:
Present
Next
I/P
State
State
A B x A B
A(t+1) = DA = A x y
01,10
00,11
00,11
01,10
Department of Electrical Engineering
37
Flip-Flop
Inputs
JA KA JB KB
JA = B
JB = x
KA = B x
KB = A x
A(t+1) = JA QA + KA QA
= AB + AB + Ax
B(t+1) = JB QB + KB QB
= Bx + ABx + ABx
38
13
JK Flip-Flops
T Flip-Flops
Example:
T Flip-Flops
Example:
Present
Next
I/P
State
State
A B x A B
Flip-Flop
Inputs
JA KA JB KB
Example:
Present
Next
F.F
I/P
O/P
State
State Inputs
A B x A B TA TB y
1
11
00
0
01
0
10
1
39
Present
Next
F.F
I/P
O/P
State
State Inputs
A B x A B TA TB y
TA = B x
y =AB
TB = x
A(t+1) = TA QA + TA QA
= AB + Ax + ABx
0
1
B(t+1) = TB QB + TB QB
1
1
=xB
Department of Electrical Engineering
40
0/0
0/0
00
1/0
01
1/1
1/0
11
0/1
10
1/0
0/0
41
14
Moore
Present
Next
I/P
O/P
State
State
A B
x A B y
0 0
0 0 0
0
0 0
1 0 1
0
0 1
0 0 0
1
0 1
1 1 1
0
1 0
0 0 0
1
1 0
1 1 0
0
1 1
0 0 0
1
1 1
1 1 0
0
Present
State
A B
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
I/P
x
0
1
0
1
0
1
0
1
Next
O/P
State
A B y
0 0
0
0 1
0
0 1
0
1 0
0
1 0
0
1 1
0
1 1
1
0 0
1
42
43
44
15
State / Output
0
0
1
00/0
11/1
State: a a b c d e f f g f g a
Input: 0 1 0 1 0 1 1 0 1 0 0
Output:
A reduction in the
number of states may
result in a reduction in
the number of flip-flops.
An example state
diagram showing in Fig.
5.25.
01/0
State Reduction
10/0
1
0
0 0 0 0 0 1 1 0 1 0 0
45
46
47
16
Equivalent states
e = g (remove g);
d = f (remove f);
For each member of the set of inputs, they give exactly the
same output and send the circuit to the same state or to an
equivalent state.
One of them can be removed.
State: a a b c d e d d e d e a
Input: 0 1 0 1 0 1 1 0 1 0 0
Output: 0 0 0 0 0 1 1 0 1 0 0
Department of Electrical Engineering
48
49
50
17
Implication Table
The checking of each pair
of states for possible
equivalence can be done
systematically using
Implication Table.
The unused states are
treated as don't-care
condition fewer
combinational gates.
Implication Table
(a, b) imply (c, d) and (c, d) imply (a, b). Both pairs of states are
equivalent; i.e., a and b are equivalent as well as c and d.
Fig. 5.26 Reduced State diagram
Department of Electrical Engineering
51
52
53
18
Implication Table
Implication Table
Implication Table
On the left side along the vertical are listed all the states
defined in the state table except the last, and across the bottom
horizontally are listed all the states except the last.
The states that are not equivalent are marked with a x in the
corresponding square, whereas their equivalence is recorded
with a .
4. Finally, all the squares that have no crosses are recorded with check
marks. The equivalent states are: (a, b), (d, e), (d, g), (e, g).
We now combine pairs of states into larger groups of equivalent states.
The last three pairs can be combined into a set of three equivalent states
(d, e,g) because each one of the states in the group is equivalent to the
other two. The final partition of these states consists of the equivalent
states found from the implication table, together with all the remaining
states in the state table that are not equivalent to any other state:
2. Enter in the remaining squares the pairs of states that are implied by
the pair of states representing the squares. We do that by starting from
the top square in the left column and going down and then proceeding
with the next column to the right.
Department of Electrical Engineering
54
55
56
19
Implication Table
State Assignment
Any binary number assignment is satisfactory as long
as each state is assigned a unique number.
State Assignment
To minimize the cost of the combinational circuits.
57
58
59
20
Design Procedure
S0 / 0
0
0
0
S3 / 1
Present
Input
State
1
60
A
0
0
0
0
1
1
1
1
S1 / 0
Example:
Detect 3 or more consecutive 1s
S2 / 0
State A B
S0
0 0
S1
0 1
S2
1 0
S3
1 1
1
Department of Electrical Engineering
61
B
0
0
1
1
0
0
1
1
x
0
1
0
1
0
1
0
1
Next
State
A
0
0
0
1
0
1
0
1
B
0
1
0
0
0
1
0
1
Output
y
0
0
0
0
0
0
1
1
0
S0 / 0
S1 / 0
0
S3 / 1
1
S2 / 0
1
62
21
Example:
Detect 3 or more consecutive 1s
Present
Input
State
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
x
0
1
0
1
0
1
0
1
Next
State
A
0
0
0
1
0
1
0
1
B
0
1
0
0
0
1
0
1
Example:
Detect 3 or more consecutive 1s
A(t+1) = DA (A, B, x)
= (3, 5, 7)
DA (A, B, x) = (3, 5, 7)
0 0 1 0
=Ax+Bx
A 0 1 1 0
x
DB (A, B, x) = (1, 5, 7)
B(t+1) = DB (A, B, x)
= A x + B x
= (1, 5, 7)
y (A, B, x) = (6, 7)
y (A, B, x) = (6, 7)
Example:
Detect 3 or more consecutive 1s
Output
y
0
0
0
0
0
0
1
1
=AB
63
B
0 0 0 0
A 0 0 1 1
x
DA = A x + B x
DB = A x + B x
B
0 1 0 0
y =AB
A 0 1 1 0
x
64
65
22
Q(t) Q(t+1)
0
0
0
1
1
0
1
1
F.F.
Input
D
0
1
0
1
Present Next
State State
F.F.
Input
Q(t) Q(t+1) J K
0 x
0
0
1 x
0
1
x 1
1
0
1
1
x 0
Q(t) Q(t+1)
0
0
0
1
1
0
1
1
Example:
Detect 3 or more consecutive 1s
0 0 (No change)
0 1 (Reset)
1 0 (Set)
1 1 (Toggle)
0 1 (Reset)
1 1 (Toggle)
0 0 (No change)
1 0 (Set)
Present
Input
State
A
0
0
0
0
1
1
1
1
T
0
1
1
0
66
B
0
0
1
1
0
0
1
1
x
0
1
0
1
0
1
0
1
Next
State
A
0
0
0
1
0
1
0
1
Flip-Flop
Inputs
B JA
0 0
1 0
0 0
0 1
0 x
1 x
0 x
1 x
KA
x
x
x
x
1
0
1
0
J B KB
0 x
1 x
x 1
x 1
0 x
1 x
x 1
x 0
Example:
Detect 3 or more consecutive 1s
Synthesis using JK Flip-Flops
Synthesis using JK F.F.
JA (A, B, x) = (3)
dJA (A, B, x) = (4,5,6,7)
KA (A, B, x) = (4, 6)
dKA (A, B, x) = (0,1,2,3)
JB (A, B, x) = (1, 5)
dJB (A, B, x) = (2,3,6,7)
KB (A, B, x) = (2, 3, 6)
dKB (A, B, x) = (0,1,4,5)
67
JA = B x
KA = x
JB = x
KB = A + x
B
0 0 1 0
B
x x x x
A x x x x
x
B
0 1 x x
A 1 0 0 1
x
B
x x 1 1
A 0 1 x x
x
A x x 0 1
x
68
23
Example:
Detect 3 or more consecutive 1s
Present
Input
State
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
x
0
1
0
1
0
1
0
1
Next
State
A
0
0
0
1
0
1
0
1
B
0
1
0
0
0
1
0
1
F.F.
Input
TA
0
0
0
1
1
0
1
0
TB
0
1
1
1
0
1
1
0
TA = A x + A B x
TA (A, B, x) = (3, 4, 6)
TB (A, B, x) = (1, 2, 3, 5, 6)
TB = A B + B x
Example:
Detect 3 or more consecutive 1s
69
B
0 0 1 0
B
0 1 1 1
A 1 0 0 1
x
A 0 1 0 1
x
70
24