Latches and Flip-Flop: Finals - Lecture 2
Latches and Flip-Flop: Finals - Lecture 2
Latches and Flip-Flop: Finals - Lecture 2
Finals – Lecture 2
Introduction
A sequential circuit consists of a feedback
path, and employs some memory elements.
Combinational
outputs Memory outputs
Combinational Memory
logic elements
External inputs
Characteristic table:
Command Q(t) Q(t+1)
(at time t) Q(t): current state
Set X 1 Q(t+1) or Q+: next state
Reset X 0
Memorise / 0 0
No Change 1 1
Memory Elements
Memory element with clock. Flip-flops are
memory elements that change state on
clock signals.
Memory Q
command element stored value
clock
Clock is usually a square wave.
Positive pulses
D
Q D Q
EN EN
Q' Q'
Gated D Latch
When EN is HIGH,
D=HIGH latch is SET
D=LOW latch is RESET
S Q D Q J Q
C C C
R Q' Q' K Q'
CLK' CLK'
CLK CLK* CLK CLK*
CLK CLK
CLK' CLK'
CLK* CLK*
CLK
X Q'
Combinational Y D Q Q2 = Y*
logic circuit
Z
CLK
Q'
D Q Q3 = Z*
Transfer CLK
Q'
Characteristic table.
T CLK Q(t+1) Comments Q T Q(t+1)
0 Q(t) No change 0 0 0
1 Q(t)' Toggle 0 1 1
1 0 1
1 1 0
Q(t+1) = T.Q' + T'.Q
T Flip-flop
Application: Frequency division.
High High High
J J QA J QB
Q
CLK C CLK C C
K K K
CLK CLK
Q QA
QB
Application: Counter
Asynchronous Inputs
S-R, D and J-K inputs are synchronous inputs, as data on
these inputs are transferred to the flip-flop’s output only
on the triggered edge of the clock pulse.
Asynchronous inputs affect the state of the flip-flop
independent of the clock; example: preset (PRE) and clear
(CLR) [or direct set (SD) and direct reset (RD)]
When PRE=HIGH, Q is immediately set to HIGH.
When CLR=HIGH, Q is immediately cleared to LOW.
Flip-flop in normal operation mode when both PRE and
CLR are LOW.
Asynchronous Inputs
A J-K flip-flop with active-LOW preset and clear inputs.
PRE PRE
J
J Q
Q Pulse
C transition
CLK
detector
K Q'
Q'
K
CLR CLR
CLK
PRE
CLR
Q
J = K = HIGH Preset Toggle Clear