Sequential Logic: ENEL 111
Sequential Logic: ENEL 111
ENEL 111
Sequential Logic Circuits
So far we have only considered circuits where 1
7
X=X+A
Input(s) Output(s)
circuit
memory
memory
Clock pulse
With
synchronous circuits a clock pulse is used to regulate the
feedback, input signal only enabled when clock pulse is high –
acts like a “gate” being opened.
Latches
The SR Latch
Consider the following circuit
R Q R R Q Q
S S Q Q
S Q
Symbol
Circuit
This 0 feeds
S=0 ~Q = 1
back to gate 2
S=0 ~Q = 1
Reset goes in-active
R=0
Q=0
When R now goes in-active 0, the
feedback from ~Q (still 1), holds Q at 0.
S=0 ~Q = 1
The “pulse” in R has changed
the output as shown in the
function table:
R S Qn+1
We went from here 0 0 Qn
0 1 1 And back again
To here 1 0 0
1 1 ?
In that process, Q changed from 1 to 0. Further signals on R will
have no effect.
Set the latch
Similar sequences can be followed to show that setting S to 1 then 0 –
activating S – will set Q to a 1 stable state.
When R and S are activated simultaneously both outputs will go to a 0
R=1
Q=0
S=1 ~Q = 0
R Q R S Qn+1
R R Q Q
0 0 ?
0 1 0
S Q S Q 1 0 1
S Q
1 1 Qn
Circuit Symbol Function Table
1 master
reset
The Clocked SR Latch
In some cases it is necessary to disable the inputs to a
latch
This can be achieved by adding a control or clock input to
the latch
When C = 0 R and S inputs cannot reach the latch
Holds its stored value
When C = 1 R and S inputs connected to the latch
Functions as before
R
Q
Q
S
Clocked SR Latch
R S C Qn+1
R R Q Q X X 0 Qn Hold
C 0 0 1 Qn Hold
C
0 1 1 1 Set
S S Q Q 1 0 1 0 Reset
1 1 1 ? Unused
Clocked D Latch
Simplest clocked latch of practical
importance is the Clocked D latch
D S
Q
Q
R
D
S Q Q
D Q D C Qn+1
C C X 0 Qn Hold
R Q Q C Q 0 1 0 Reset
1 1 1 Set
Setup time:
Data on inputs D must be held steady for at least this time
before the clock changes.
Hold time:
Data on inputs D must be held steady for at least this time
after the clock changes.
Clocked D Latch – Timing
Diagram
clock
20
Q
B
A
1
C
0
The high part t
1
represents D
active 1, the low 0
t
part active 0. 1
Q
0
t
Positive edge-triggered D Flip-flop
Timing D Q
~Q
Q
initially
unknown
Master Slave D Flip-flop
A negative edge triggered flip-flop
Master Slave
D Y D Q
C C Q
P Q
No matter how long the clock pulse, both circuits cannot be active at the
same time.
D-type Positive Edge Triggered Flip-
flop
S
Q
CLK
Q’
R
F
B D
K ~Q
• Assume Q = 0, ~Q = 1, K = 1 J K C Qn+1
0 0 Qn Hold
• Gate B is disabled (Q = 0, F = 1)
0 1 0 Reset
• Make J = 1 to change circuit, when Ck = 1, all 1 0 1 Set
inputs to A = 1, E goes to 0, makes Q = 1 1 1 Qn Toggle
• Now Q and F are both 1 so ~Q = 0 and the circuit X X X Qn Hold
has toggled.
Timing diagram for JK Flip-flop
Negative Edge Triggered
clock
can toggle.
For the JK flip flop it is assumed the pulse is quick
J
D Q
K
CLK C Q’
Summary
Flip flops are circuits controlled by a clock.