Beruflich Dokumente
Kultur Dokumente
Latches
Introduction
There are two types of latches, the S-R latch and the D-latch. We discuss these two
latches in this chapter.
Present
Output
output
Qn
Qn+1
Latch Behaviour
No change in State
Set Operation
Reset operation
Indeterminate operation
When both S and R are LOW the logical states of the output terminal do not
change. This is shown by Qn +1 = Qn .
2.
When S=1 and R=0 the logical state of the output Q will become 1 no matter
what its value was before. This is known as the set operation.
3.
If S=0 and R=1 the logical state of the output Q will become 0 no matter what its
Q
Figure 2: Nor gate implementation of the S-R latch
The operation has to be analyzed with the 4 possible input combinations together with
the 2 possible previous states.
No Change Condition: Inputs S = 0 and R = 0:
A: Assuming the Initial Condition Q = 1 and Q = 0:
The output Q after input is applied would be:
Q = (R + Q )' = 1 and Q = (S + Q)' = 0.
Q =1
S=1
R=0
Q =0
Figure 3: Set Operation: S =1 and R = 0
S=0
R=1
Q =1
Figure 4: Reset Operation: S =0 and R = 1
Q=?
S=1
R=1
Q =?
Figure 5: Indeterminate Operation: S =1 and R = 1
No matter what state Q and Q are in, application of 1 at input of NOR gate always
results in 0 at output of NOR gate, which results in both Q and Q set to LOW (i.e. Q
= Q ). LOW in both the outputs basically is wrong, so this case is invalid.
Q
R
Figure 6: Nand gate implementation of the S-R latch
This circuit is a basic NAND latch. The inputs are generally designated S and R for
"Set" and "Reset" respectively. This is because the NAND inputs must normally be
logic 1 to avoid affecting the latching action, the inputs are considered to be inverted
in this circuit.
Table 2: NAND S-R Latch Truth Table
Latch Inputs
Present
Output
Qn
Qn+1
Latch Behaviour
Indeterminate operation
Set Operation
Reset operation
No change in State
(Keep State)
Control signal C is used to gate the input S and R to the RS Latch. When C is HIGH,
both the AND gates act as buffers and thus R and S appears at the RS latch input and
it functions like a normal RS latch. When C is LOW, it drives LOW to both inputs of
RS latch. As we saw in previous page, when both inputs of a NOR latch are low,
values are retained (i.e. the output does not change).
Q
S
C
R
Q
Figure 7: Clocked S-R NOR latch
Q
R
NAND Gate
Figure 8: Clocked S-R NAND latch
By adding a pair of NAND gates to the input circuits of the RS latch, we accomplish
two goals: normal rather than inverted inputs, and a third input common to both gates
which we can use to synchronize this circuit with others of its kind.
The clocked RS latch circuit is very similar in operation to the basic latch. The S and
R inputs are normally at logic 0, and must be changed to logic 1 to change the state of
the latch. The NAND gates ensure that the output can only change state while the
clock signal C is logic 1. When C is logic 0, the S and R inputs will have no effect.
The D Latch
A D latch has one input, labelled D, one enable or clock input, and one output Q. The
logical state of the D input is transferred to the output whenever the clock input is
HIGH. The Q output will follow any changes in the logical state of the D input as
long as the clock input remains HIGH. When the clock input goes LOW the logical
state of the D input at that moment will be retained at the Q output no matter what
changes occur at the D input. When the clock input goes HIGH again the Q output
will once again follow any changes in the logical state of the D input. A D latch is
therefore said to be transparent when the clock is HIGH.
The symbol for a D latch is shown below:
D
Q
Clk
Qn+1
10
Construction of D-Latches
A D latch can be constructed from a clocked S-R flip flop by adding an inverter as shown:
Clk
Q
R
Figure 10: Adding an inverter to an S-R latch to get a D latch
Q
D
S
Clk
Q
Figure 11: Adding an inverter to a NOR S-R latch to get a D latch
11