Module 4 - Seq Circuits 1
Module 4 - Seq Circuits 1
Circuits
Part 1 – Storage Elements and Sequential
Circuit Analysis
Overview
Part 1 - Storage Elements
• Introduction to sequential circuits
• Types of sequential circuits
• Storage elements
Latches
Flip-flops
Part 2 - Sequential Circuit Analysis
Part 3 - Sequential Circuit Design
Part 4 – State Machine Design
Introduction to Sequential Circuits
Inputs Outputs
Combina-
A Sequential tional
circuit contains: Storage
Logic
• Storage elements:
Latches or Flip-Flops Next
Elements
State
• Combinational Logic:
State
Implements a multiple-
output switching function
Inputs are signals from the outside.
Outputs are signals to the outside.
Other inputs, State or Present State,
are signals from storage elements.
The remaining outputs, Next State
are inputs to storage elements.
Introduction to Sequential Circuits
Inputs Outputs
Combina-
tional
Storage
Logic
Elements
Combinatorial Logic Next
• Next state function State
Next State = f(Inputs, State) State
• Output function (Mealy)
Outputs = g(Inputs, State)
• Output function (Moore)
Outputs = h(State)
Output function type depends on specification and affects
the design significantly
Types of Sequential Circuits
CLOCK
Q
Clocked S - R Latch – Example 1
CLOCK
0 1 1
0 0 0 0
S 00
1 1
0 0 0 0 0 0
R
0
Q
Clocked S - R Latch – Example 2
CLOCK
Q
Clocked S - R Latch – Example 2
CLOCK
0 1 1
0 0 0 0 0
S 00
1 1 1
0 0 0 0 0 0
R
0
Q
D Latch
Adding an inverter D
to the S-R Latch, Q
CLOCK
Q
D Latch – Example 1
CLOCK
1 1 1 1 1
D 0 0 0 0 0
Q
D Latch – Example 2
CLOCK
Q
D Latch – Example 2
CLOCK
1 1 1 1 1 1
D 0 0 0 0 0 0 0
Q
Flip-Flops
D Q Y
Clock C Q
Suppose that initially Y = 0.
Clock
Y
As long as C = 1, the value of Y continues to change!
The changes are based on the delay present on the loop
through the connection from Y back to Y.
This behavior is clearly unacceptable.
Desired behavior: Y changes only once per clock pulse
The Latch Timing Problem (continued)
CLOCK
Q1
Q2
S-R Master-Slave Flip-Flop – Example 1
M M M M
CLOCK S S S S
1 1
0 0 0 0 0 00
S
1 1
R 0 0 0 0 0 0 0
Q1
Q2
S-R Master-Slave Flip-Flop – Example 2
CLOCK
Q1
Q2
S-R Master-Slave Flip-Flop – Example 2
M M M M
CLOCK S S S S
1 1 1
0 0 0 0 0
S 00
0
1 1
R 0 0 0 0 0 0 0 0
0
Q1
Q2
Flip-Flop Solution
CLOCK
Q
Edge-Triggered D Flip-Flop – Example 1
M M M M
CLOCK S S S S
1 1 1 1 1
D 0 0 0 0 0
Q
Edge-Triggered D Flip-Flop – Example 2
CLOCK
Q
Edge-Triggered D Flip-Flop – Example 2
M M M M
CLOCK S S S S
1 1 1 1 1 1
D 0 0 0 0 0 0 0
Q
Positive-Edge Triggered D Flip-Flop
Formed by D D Q S Q Q
adding inverter
to clock input C C Q C Q Q
R
CLOCK
Q
Positive-Edge Triggered D Flip-Flop –
Example 1
S S S S
CLOCK M M M M
1 1 1 1 1
D 0 0 0 0 0
Q
Standard Symbols for Storage
Elements
S S D D
R R C C
Triggered D
Triggered SR Triggered SR Triggered D
Edge-Triggered: (b) Master-Slave Flip-Flops
Dynamic D D
indicator
C C
Triggered D Triggered D
(c) Edge-Triggered Flip-Flops
Direct Inputs
At power up or at reset, all or part
of a sequential circuit usually is S
initialized to a known state before D Q
it begins operation
This initialization is often done C Q
R
outside of the clocked
behavior
of the circuit,
Direct R and/ori.e.,S inputs that control the state of the
asynchronously.
latches within the flip-flops are used for this
initialization.
For the example flip-flop shown
• 0 applied to R resets the flip-flop to the 0 state
• 0 applied to S sets the flip-flop to the 1 state
Other Flip-Flop Types
Small Glitch
The small glitch in J
propagates through the flip-
flop even though it is small.
This is due to the fact that the
JK has the 1’s catching
problem.
J-K Flip-flop (continued)
Implementation Symbol
• To avoid 1s catching
behavior, one solution
used is to use an J
edge-triggered D as
the core of the flip-flop C
K
J D
C
K
J-K Flip-flop (continued)
K
J ?
D
1
K C
J 1 1 1
J K Q Q(t+1)
Q
0 0 0 0
D = J Q’ +
0 0 1 1
K’Q
0 1 0 0
0 1 1 0
1 0 0 1 J D
1 0 1 1
K
1 1 0 1 C
1 1 1 0
T Flip-flop
Behavior
• Has a single input T
For T = 0, no change to state
For T = 1, changes to opposite state
Same as a J-K flip-flop with J = K = T
As a master-slave, has same “1s catching”
behavior as J-K flip-flop
Cannot be initialized to a known state using the
T input
• Reset (asynchronous or synchronous) essential
T Flip-flop (continued)
Implementation Symbol
• To avoid 1s catching
behavior, one solution
used is to use an T
edge-triggered D as
the core of the flip-flop
C
D
T
C
T Flip-flop (continued)
T ?
D
1
C
T 1
Q
T Q Q(t+1)
D=T
0 0 0
Q
0 1 1
1 0 1
1 1 0
T D
C
Basic Flip-Flop Descriptors
Used in analysis
• Characteristic table - defines the next state of
the flip-flop in terms of flip-flop inputs and
current state
• Characteristic equation - defines the next
state of the flip-flop as a Boolean function of
the flip-flop inputs and the current state
Used in design
• Excitation table - defines the flip-flop input
variable values as function of the current
state and next state
D Flip-Flop Descriptors
Characteristic Table
D Q(t +1)
0 0 Reset
1 1 Set
Operation
Characteristic Equation
Q(t+1) = D
Excitation Table
Q(t +1) D
0 1 Reset
1
Operation 2 Set
T Flip-Flop Descriptors
Characteristic Table
T Q(t+1)
1 Q(t No change
Operation
) Complement
2 Q(t
Characteristic
) Equation
Q(t+1) = T Q
Excitation Table
Q(t+1)
TQ(t 1 No change
) 2 Complement
Operation
Q(t
)
S-R Flip-Flop Descriptors
Characteristic Table
S R Q(t+1) Operation
0 0 Q(t) No
change
0 1 0 Reset
1 0 1 Set
Characteristic
1 1 Equation
? Undefined
Q(t+1) = S + R Q, S.R = 0
Excitation Table
Q(t) Q(t+1) S R Operation
0 0 0 X No change
0 1 1 0 Set
1 0 0 1 Reset
1 1 X 0 No change
S-R Flip-flop
R
S ?
D
1 -
R C SR=
S 1 1 - 1 0
S R Q Q(t+1)
Q
0 0 0 0
0 0 1 1 D=S+ SR =
0 1 0 0 R’Q , 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 X
1 1 1 X
J-K Flip-Flop Descriptors
Characteristic Table
J K Q(t+1) Operation
0 0 Q(t) No change
0 1 0 Reset
1 0 1 Set
1 1 Q(t) Complement
Characteristic Equation
Q(t+1) = J Q + K Q
Excitation Table
Q(t) Q(t J K
+1) Operation
0 0 0 X No change
0 1 1 X Set
1 0 X 1 Reset
1 1 X 0 No
Change
Example 1: Flip-flop Behavior
Use the characteristic tables to find the output waveforms
for the flip-flops shown:
Clock
D,T
D QD
C
T QT
C
Example 1: Flip-Flop Behavior (continued)
Use the characteristic tables to find the output waveforms
for the flip-flops shown:
Clock
S,J
S
QR,K
SR
?
C
R
J Q JK
C
K
Terms of Use
All (or portions) of this material © 2008 by Pearson
Education, Inc.
Permission is given to incorporate this material or
adaptations thereof into classroom presentations and
handouts to instructors in courses adopting the latest
edition of Logic and Computer Design Fundamentals as
the course textbook.
These materials or adaptations thereof are not to be
sold or otherwise offered for consideration.
This Terms of Use slide or page is to be included within
the original materials or any adaptations thereof.