Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• Sequential circuits
– primitive sequential elements
– combinational logic
• Models for representing sequential circuits
– finite-state machines (Moore and Mealy)
– representation of memory (states)
– changes in state (transitions)
• Basic sequential circuits
– shift registers
– counters
• Design procedure
– state diagrams
– state transition table
– next state functions
Classification of Digital Circuits
• Combinational logic circuits.
– Output depends only on present input.
• Sequential circuits.
– Output depends on present input and present
state of the circuit.
Combinational vs. Sequential Logic
In Out
Combinational Combinational
In Logic Out Logic
Circuit Circuit
State
Combinational Sequential
Timing signal
(clock)
Clock
a periodic external event (input)
Clock
•synchronizes when current state changes happen
•keeps system well-behaved
•makes it easier to design and build large systems
Latches and Flip-Flops
• A latch is a temporary storage device that
has two stable states (bistable). It is a basic
form of memory
• The sequential devices differ in the way
their outputs are changed:
– The output of a latch changes independent of a
clocking signal.
– The output of a flip–flop changes at specific
times determined by a clocking signal.
S-R Latch
• SR latch based on NOR gates.
• The S input sets the Q output to 1 while R reset it
to 0.
• When R=S=0 then the output keeps the previous
value.
• When R=S=1 then Q=Q’=0, and the latch may go
to an unpredictable next state.
S-R Latch
• S’R’ latch based on NAND gates.
• The S’ input sets the Q output to 1 while R’ reset
it to 0.
• When R’=S’=1 then the output keeps the previous
value.
• When R’=S’=1 then Q=Q’=1, and the latch may
go to an unpredictable next state.
S-R Latch
• The S-R (Set-Reset) latch is the most basic type.
• It can be constructed from NOR gates or NAND gates.
• With NOR gates, the latch responds to active-HIGH
inputs; with NAND gates, it responds to active-LOW
inputs.
S-R Latch with control input (Clocked SR Latch)
Gated SR Latch
0 0 0 0 No change
SR S
0 0 1 1
0 1 0 0 Reset Q 00 01 11 10
0 1 1 0
1 0 0 1 Set 0 0 0 Ð 1
1 0 1 1
1 1 0 Not allowed
1 1 1 Q 1 1 0 Ð 1
(a)
R
(c)
Q* = S + R Q
Gated D Latch (D flip-Flop)
Q0 indicates the previous state (the previously stored value)
X
D S
Q
C
Q’
Y R
X Y C Q Q’
D C Q Q’
0 0 1 Q0 Q0’ Store ( previous state)
0 1 0 1 0 1 1 0 1 Reset
1 1 1 0 1 0 1 1 0 Set
X 0 Q0 Q0’ 1 1 1 1 1 Not allowed
X X 0 Q0 Q0’ Store
D flip-Flop
X
D S
Q
C
Q’
Y R
D C Q Q’
0 1 0 1
1 1 1 0
X 0 Q0 Q0’
CLK
D Q D
CLK
Q
CLK
D Q D
CLK
Q
Q* = DC + C Q
D C Q Q’
D Q
0 0 1
C Q’ 1 1 0
X 0 Q0 Q0’
cloc
k
Characteristic Table
Characteristic equation of JKFF
Master-slave JK flip-flop
Edge Triggered J-K Flip-Flop
• of the clock (for example the D or J-K
inputs).
• Most flipflops have other inputs that are
asynchronous, meaning they affect the
output independent of the clock.
• Two such inputs are normally labeled
preset (PRE) and clear (CLR).
• These inputs are usually active LOW.
• A J-K flip flop with active LOW preset
and CLR is shown.
T Flip-Flop
• Also known as the toggle flip-flop.
• When input T = 0 the output Q retain its previous
value.
• When input T = 1 the output Q inverts on every
tick of the clock.
• When inputs J and K of a J-K flip-flop are
connected together, the J-K flip-flop will behave
like a T flip-flop.
Positive Edge-Triggered T Flip-Flop