Ch5 Sequential Circuits
Ch5 Sequential Circuits
1
Introduction
Hand-held devices, cell phones, navigation receivers, personal computers, digital
cameras, personal media players, and virtually all electronic consumer products
have the ability to send, receive, store, retrieve, and process information
represented in a binary format. The technology enabling and supporting these
devices is critically dependent on electronic components that can store
information, i.e., have memory.
3
Synchronous Sequential Circuits
A synchronous sequential circuit employs signals that affect the storage
elements at only discrete instants of time.
4
Storage Elements: Latches
SR Latch:
The most basic type of flip-flops are the latches that operates
with Signal levels. Latches are building blocks of all flip-flops.
5
SR Latch:
S R Q0 Q Q’
0 0 0 0 1 Q = Q0
R 0 0
Q
S Q
0 1
Initial Value
6
SR Latch:
S R Q0 Q Q’
0 0 0 0 1 Q = Q0
0 0 1 1 0 Q = Q0
R 0 1
Q
S Q
0 0
7
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1 Q=0
R 1 0
Q
S Q
0 1
8
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1 Q=0
R 1 1
Q
0 1 1 0 1 Q=0
S Q
0 0
9
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1
R 0
Q=0
0 0 1 1 0 1
Q 1 0 0 1 0 Q=1
S Q
1 1
10
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1
R 0
Q=0
1 0 1 1 0 1
Q 1 0 0 1 0 Q=1
1 0 1 1 0 Q=1
S Q
1 0
11
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1
R 1
Q=0
0 0 1 1 0 1
Q 1 0 0 1 0
Q=1
1 0 1 1 0
1 1 0 0 0 Q = Q’
S Q
1 10
12
SR Latch:
S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 0 1 1 0
R Q 0 1 0 0 1
Q=0
0 1 1 0 1
1 0 0 1 0
Q=1
1 0 1 1 0
S Q 1 1 0 0 0 Q = Q’
0 1 1 1 0 0
13
SR Latch with NAND gate
17
Symbols for Latches
18
Storage Elements: Flip-flop
19
SR Flip-flop
20
Triggering Method
21
Example
22
Tables of SR flip-flop
Qn+1 = S + QnR’
23
Edge Triggered D flip-flop
24
D Flip flop
25
Latches versus flip-flops
26
Waveform of D flip-flop
27
Master-Slave D Latch
28
Master-Slave D Latch (waveform)
29
J-K Flip-flop
30
J-K Flip-flop
31
J-K Flip-flop Characteristic Equations
J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q 0 1 0 Reset
0 1 1
K Q 1 0 0 Set
1 0 1
1 1 0 Toggle
1 1 1
32
J-K Flip-flop Characteristic Equations
J K Q(t) Q(t+1)
0 0 0 0
0 0 1 1 No change
J Q
0 1 0 0
0 1 1 0 Reset
K Q 1 0 0
1 0 1 Set
1 1 0
1 1 1 Toggle
33
J-K Flip-flop Characteristic Equations
J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q
0 1 0 0 Reset
0 1 1 0
K Q 1 0 0 1 Set
1 0 1 1
1 1 0 Toggle
1 1 1
34
J-K Flip-flop Characteristic Equations
J K Q(t) Q(t+1)
0 0 0 0
No change
0 0 1 1
J Q
0 1 0 0
Reset
0 1 1 0
K Q 1 0 0 1
Set
1 0 1 1
1 1 0 1
Toggle
1 1 1 0
35
J-K Flip-flop Characteristic Equations
J K Q(t) Q(t+1)
0 0 0 0
0 0 1 1 K
J Q
0 1 0 0 0 1 0 0
0 1 1 0 J 1 1 0 1
K Q 1 0 0 1 Q
1 0 1 1
1 1 0 1
1 1 1 0
T Q(t+1)
Q(t+1) = JQ’ + K’Q
0 Q(t)
= TQ’ + T’Q = T⊕Q
1 Q’(t)
37
Flip-Flop Truth Tables and Equations
D Q(t+1)
D Q
0 0 Reset
Q(t+1) = D
Q 1 1 Set
J K Q(t+1)
J Q 0 0 Q(t) No change
0 1 0 Reset Q(t+1) = JQ’ + K’Q
K Q 1 0 1 Set
1 1 Q’(t) Toggle
T Q T Q(t+1)
0 Q(t) No change Q(t+1) = T Q
Q 1 Q’(t) Toggle 38
Flip-Flop Excitation Table
39
Flip-Flops with Direct Inputs
Asynchronous Reset
R D CLK Q(t+1)
0 x x 0
40
Flip-Flops with Direct Inputs
Asynchronous Reset
R D CLK Q(t+1)
0 x x 0
1 0 ↑ 0
1 1 ↑ 1
41
Flip-Flops with Direct Inputs
Asynchronous Preset and Clear
43
Flip-Flops with Direct Inputs
44
Terminology
45
Analysis
of
Clocked Sequential
Circuit
46
Analysis of clocked sequential circuit
Analysis Procedure:
48
49
Example (Continued)
50
Example
Problem: Drive the state table and state diagram of the sequential circuit
given below:
51
Example (Using J-K Flip-flop)
Problem: Drive the state table and state diagram of the sequential circuit
given below:
Solution:
Step:
52
Example (Continued)
53
Example (Using T Flip-flop)
Problem: Drive the state table and state diagram of the sequential
circuit given below:
x A
T Q y
R Q
T Q
B
R Q
Step 1:
TA = B x TB = x
y =AB
54
Example
Step 2: A(t+1) = TA Q’A + T’A QA
= AB’ + Ax’ + A’Bx
B(t+1) = TB Q’B + T’B QB
=xB
Step 3:
Step 4:
55
Design
of
Sequential Circuit
56
Design Procedure for sequential circuit
58
Example (Continued)
DA = AX+ BX
DB = A’X
Y = (A + B) X’
59
60
Problem
Problem: For the given state diagram, determine the state transitions and output
sequence that will be generated when an input sequence of 110111001 is applied
to the circuit and it is initially in the state 00.
61
Design of Clocked Sequential Circuits
0/0 1/0
S0 S1
0/0 State A B
S0 0 0
0/1 1/0
0/0 S1 0 1
S2 1 0
S3 S2 S3 1 1
1/0
1/1
62
Example (Continued)
Present Next
Input Output
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 0
0 1 1 1 0 0
1 0 0 0 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 1 1 1
63
Example (Continued)
DA = A x + B x
DB = A x + B’ x
y =AB
x D Q A
Q
y
D Q B
CLK Q
65
Flip-Flop Excitation Tables
66
Example: Design a Sequential circuit using J-K flip-flops for a system
which has the following state diagram.
y (A, B, x) = ∑ (6, 7) 67
Example (Continued)
y (A, B, x) = ∑ (6, 7)
= AB
68
69
Design a Sequential circuit using T flip-flops for a system which has the
following state diagram.
y (A, B, x) = ∑ (6, 7)
69
70
Design a Sequential circuit using T flip-flops for a system which
has the following state diagram.
y (A, B, x) = ∑ (6, 7)
70
=AB
71
71
72
72
73
73
74
74
75
Explanation (Continued…)
75
76
Explanation (Continued…)
76
77
• Two outgoing arrows for each node, to account for the possibilities of
X=0 and X=1
• The remaining arrows we need are shown in blue. They also allow for
the correct detection of overlapping occurrences of 1001.
0/0
1/0
1/0 0/0 0/0
A B C D
1/0
0/0 1/1
State Meaning
A None of the desired pattern (1001) has been input yet.
B We’ve already seen the first bit (1) of the desired pattern.
C We’ve already seen the first two bits (10) of the desired pattern. 78
D We’ve already seen the first three bits (100) of the desired pattern.
Example-3: Sequence Detector
X = 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 0
Z = 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0
(time: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
79
79
Design of 101 Sequence Detector
• State Diagram:
1/0
80
80
Design of 101 Sequence Detector
81
81
Assignment#5
82