2. latches and flip-flops
The latch is a type of temporary storage device that has 2
stable states (bistable) and is normally placed in a category
separate from the flip-flops.
Latches are similar to flip-flops because they are bistable
devices that can reside in either of 2 states using feedback
arrangement, in which the outputs are connected back to the
opposite inputs.
The main difference between latches and flip-flops is in the
method used for changing their state.
3. The s-r (set-reset) latch
A latch is a type of bistable logic device/multivibrator.
It can remain in either of its 2 states, SET/RESET.
2 versionsof set-reset(s-r) latches:
An active-HIGH input S-R (SET-RESET)
latch is formed with 2 cross coupled NOR
gates .
An active-LOW input S-R latch is formed
with 2 cross coupled NAND gates .
4. Negative-or /equivalent of the nand gate s-r latch
The latch in the figure has 2 inputs, S and R,
and 2 outputs Q and Q. The 2 inputs and the Q
output are HIGH, which is the normal latched
state. Since the Q output is connected back to
an input of gate G2, and the R input is HIGH,
the output of G2 must be LOW. This LOW
output is coupled back to an input of gate
G1,ensuring that its output is HIGH.
“WHEN ‘Q’ IS HIGH, ‘Q’ IS LOW AND WHEN ‘Q’ IS LOW, ‘Q’ IS HIGH.”
When the Q output is HIGH, the latch is in
the SET state. When the Q output is LOW, the
latch is in the RESET state. In normal
operation, the outputs of a latch always
complement each other.
5. truth table and Logic symbols
Active-HIGH input S-
R latch
Active-LOW input S-R
latch
S
R
Q
Q
INPUTS OUTPUTS
COMMENTS
S R Q Q
1 1 NC NC No change
0 1 1 0 SET
1 0 0 1 RESET
0 0 1 1 Invalid condition
S
R
Q
Q
S
R
6. application
An S-R latch can be used to eliminate the
effects of switch bounce as shown in the figure.
The switch is normally in position 1, keeping
the R input LOW and the latch RESET.
The Q output of the latch provides a clean
transition from LOW to HIGH, thus
eliminating the voltage spikes caused by
contact bounce. Similarly, a clean transition
from HIGH to LOW is made when the
switch is thrown back to position 1.
When the switch is thrown to position 2, R
goes HIGH because of the pull-up resistor to
VCC , and S goes LOW on the first contact.
Although S remains LOW for only a very short
time before the switch bounces, this is sufficient
to set the latch. Any further voltage spikes on
the S input due to switch bounce do not affect
the latch, and it remains SET.