Digital Logic Design
Digital Logic Design
Digital Logic Design
Supas bashin
Latches
A latch is a temporary storage device that has two stable
states (bistable). It is a basic form of memory.
The S-R (Set-Reset) latch is the most basic type. It can be constructed
from NOR gates or NAND gates. With NOR gates, the latch responds
to active-HIGH inputs; with NAND gates, it responds to active-LOW
inputs.
R S
Q Q
Q Q
S R
Q Q
S R
2 S Q
S
R R Position Position
1 1 to 2 2 to 1
A gated latch is a variation on the basic latch.
The gated latch has an additional S
Q
input, called enable (EN) that must
be HIGH in order for the latch to
EN
respond to the S and R inputs.
Show the Q output with Q
relation to the input signals. R
Assume Q starts LOW.
Keep in mind that S and R are only active when EN is HIGH.
S
R
EN
Q
D latch
The D latch is an variation of the S-R latch but combines
the S and R inputs into a single D input as shown:
D D Q
Q
EN EN
Q
Q
D Q D Q
C C
Dynamic Q Q
input
indicator (a) Positive edge-triggered (b) Negative edge-triggered
The truth table for a positive-edge triggered D flip-flop
shows an up arrow to remind you that it is sensitive to its
D input only on the rising edge of the clock; otherwise it is
latched. The truth table for a negative-edge triggered D
flip-flop is identical except for the direction of the arrow.
1 1 0 SET 1 1 0 SET
0 0 1 RESET 0 0 1 RESET
Truth Table
Edge triggered S-R Flip-Flop output
Positive edge-triggered D
flip-flop
Positive edge triggered D-type Flip-Flop
The J-K flip-flop is more versatile than the D flip flop. In addition to
the clock input, it has two inputs, labeled J and K. When both J and K
= 1, the output changes states (toggles) on the active clock edge (in
this case, the rising edge).
Inputs Outputs
J K CLK Q Q Comments
0 0 Q0 Q0 No change
0 1 0 1 RESET
1 0 1 0 SET
1 1 Q0 Q0 Toggle
Positive edge triggered J-K Flip-Flop in action
Negative edge triggered J-K Flip-Flop in action
A D-flip-flop does not have a toggle mode like the J-K flip-
flop, but you can hardwire a toggle mode by connecting Q
back to D as shown. This is useful in some counters
(Chapter 8).
D Q
(4) (8)
R1
(7) RESET VCC
DISCH
(6) (3)
The trigger is a THRES OUT
negative-going (2) (5) tW = 1.1R1C1
TRIG CONT
pulse. GND
C1 (1)
Example
Determine the pulse width for the circuit
shown.
tW = 1.1R1C1 = 1.1(10 kW)(2.2 mF) = 24.2 ms
+VCC
+15 V
(4) (8)
R1
10 kW (7) RESET VCC
DISCH
(6) (3)
THRES OUT
(2) (5) tW = 1.1R1C1
TRIG CONT
C1 GND
(1)
2.2 mF
Project
Group Assignment
Any question?
37
References
1. T. Floyd, “Digital Fundamental”, 10th Ed., USA:
PrenticeHall, 2008
2. R.J. Tocci, “Digital Systems: Principles and
Applications”, 10th Ed., USA: Prentice-Hall, 2006
3. W. Kleitz, “Digital Electronics: A Practical
Approach”, 8th Ed., USA: Prentice-Hall, 2007
4. Begnell and Donovan, “Digital Electronics”, 5th
Ed., USA: Delmar Thomson Learning, 2006