Lect19 Sequential Logic Part-1
Lect19 Sequential Logic Part-1
sg/~cs2100/
Lecture #19
Sequential Logic
Lecture #2: Overview of C Programming 1-2
Questions?
IMPORTANT: DO NOT SCAN THE QR CODE IN THE
VIDEO RECORDINGS. THEY NO LONGER WORK
Ask at
https://sets.netlify.app/module/61c416e2340b0f1ee7dc6257
OR
1. Introduction (1/2)
§ Two classes of logic circuits
§ Combinational
§ Sequential
Combinational Combinational
inputs : : :: outputs inputs : : :: outputs
Logic Logic
Memory
Aaron Tan, NUS Lecture #19: Sequential Logic 6
1. Introduction (2/2)
§ Two types of sequential circuits:
§ Synchronous: outputs change only at specific time
§ Asynchronous: outputs change at any time
§ Multivibrator: a class of sequential circuits
§ Bistable (2 stable states)
§ Monostable or one-shot (1 stable state)
§ Astable (no stable state)
Memory Q
command element stored value
§ Characteristic table:
Command Q(t) Q(t+1)
(at time t) Q(t) or Q: current state
Set X 1
Q(t+1) or Q+: next state
Reset X 0
Memorise / 0 0
No Change 1 1
Aaron Tan, NUS Lecture #19: Sequential Logic 8
Memory Q
command element stored value
clock
§ Pulse-triggered
§ Latches
Positive edges Negative edges
§ ON = 1, OFF = 0
§ Edge-triggered
§ Flip-flops
§ Positive edge-triggered (ON = from 0 to 1; OFF = other time)
§ Negative edge-triggered (ON = from 1 to 0; OFF = other time)
Aaron Tan, NUS Lecture #19: Sequential Logic 10
10100 R S R Q Q'
Q 11000 1 0 1 0 initial
0 0 1 0 (afer S=1, R=0)
0 1 0 1
Q' 0 0 1 1 0 0 0 0 1 (after S=0, R=1)
10001 S
1 1 0 0 invalid!
§ Block diagram:
S Q
R Q'
Aaron Tan, NUS Lecture #19: Sequential Logic 12
S R Q(t+1)
0 0 Q(t) No change Q(t+1) = ?S + R'∙Q
0 1 0 Reset
1 0 1 Set S∙R = 0
1 1 indeterminate
±
Aaron Tan, NUS Lecture #19: Sequential Logic 13
Q' Q'
R R
§ In this case, (Sometimes, the
§ when R=0 and S=1, the latch is reset (i.e. Q becomes 0) inputs are labelled
§ when R=1 and S=0, the latch is set (i.e. Q becomes 1) as S' and R'.)
§ when S=R=1, it is a no-change command.
§ when S=R=0, it is an invalid command.
§ Sometimes, we use the alternative gate diagram for the NAND gate. See
diagram on the right above. (This appears in more complex latches/flip-flops
in the later slides.)
Aaron Tan, NUS Lecture #19: Sequential Logic 14
S
Q S Q
EN EN
Q' R Q'
R
D
Q D Q
EN EN
Q' Q'
Aaron Tan, NUS Lecture #19: Sequential Logic 16
±
Aaron Tan, NUS Lecture #19: Sequential Logic 17
4. Flip-flops (1/2)
§ Flip-flops are synchronous bistable devices.
§ Output changes state at a specified point on a triggering
input called the clock.
§ Change state either at the positive (rising) edge, or at the
negative (falling) edge of the clock signal.
Clock signal
4. Flip-flops (2/2)
§ S-R flip-flop, D flip-flop, and J-K flip-flop.
§ Note the “>” symbol at the clock input.
S Q D Q J Q
C C C
R Q' Q' K Q'
S Q D Q J Q
C C C
R Q' Q' K Q'
CLK
Q'
X
Combinational Y D Q Q2 = Y*
logic circuit
Z CLK
Q'
D Q Q3 = Z*
Transfer CLK
Q'
±
Aaron Tan, NUS Lecture #19: Sequential Logic 24
4.4 T Flip-flop
§ T flip-flop: Single input version of the J-K flip-flop, formed
by tying both inputs together.
T
Q T J
Pulse Q
CLK transition C
detector
CLK
Q' K Q'
§ Characteristic table:
Q T Q(t+1)
T CLK Q(t+1) Comments
0 0 0
0 Q(t) No change
0 1 1
1 Q(t)' Toggle
1 0 1
1 1 0
Q(t+1) = T∙Q'
? + T'∙Q
±
Aaron Tan, NUS Lecture #19: Sequential Logic 25
J
Q
J Q Pulse
C transition
CLK detector
K Q' Q'
K
CLR CLR
CLK
PRE
CLR
Q
J = K = HIGH Preset Toggle Clear
Aaron Tan, NUS Lecture #19: Sequential Logic 27
End of File