Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The basic bistable element is shown in Fig. 7.1. It contains two NOT gates
where the outputs are fed to inputs of the opposite NOT gate.
the circuit is stable. Likewise, another stable state would exist if one assumed
at
7.1.1 SR Flip-Flop/Latch
The circuit of set-reset SR latch and its corresponding function table are shown
in Fig. 7.2 and Fig. 7.3 respectively. The shown SR latch has two NOR gates,
where they have their inputs fed from the outputs of the crossed NOR gates. SR
latch can also be designed with two NAND gates. For NAND gate SR latch,
.
Input Output
S R Q
0 0 Q
0 1 0 1
1 0 1 0
1 1 undefined undefined
Figure 7.3: Function table of a SR latch
- 112 -
07 Flip-Flops and Applications
The excitation function table of the SR latch is shown in Fig. 7.4. Note that
(n+1) means next state.
Input Output
Qn S R Qn+1
0 0 0 0 1
0 0 1 0 1
0 1 0 1 0
0 1 1 X undefined
1 0 0 1 0
1 0 1 0 1
1 1 0 1 0
1 1 1 X undefined
Figure 7.4: Excitation function table of SR latch
Based on the truth table shown in Fig. 7.4, the state diagram of the SR flip-flop
is shown in Fig. 7.5.
Based on the excitation table, the Karnaugh map for the output Q n+1, which is
shown in Fig. 7.6(a), is Qn+1 = S + Qn , whilst the complement output
shown in Fig. 7.6(b) is = = .
- 113 -
07 Flip-Flops and Applications
(a) Normal contact switch (b) Output oscillate due to contact bounce
Figure 7.7: Normal contact switch
Using SR latch, one can see from the function table, when a SR latch is reset or
set, its output state would remain until the set or rest logic is applied. A typical
circuit utilizing a SR flip-flop to eliminate contact bouncing is shown in Fig.
7.8(a). Without the SR flip-flop, the contact would cause bouncing set output to
as shown
in Fig. 7.8(b).
- 114 -
07 Flip-Flops and Applications
A SR flip-flop designed using NAND gates is shown in Fig. 7.9 and its function
table is shown in Fig. 7.10. Note n denotes present state and (n+1) denotes next
state.
Input Output
CLK Q
0 0 1 undefined undefined
0 1 1 1 0
1 0 1 0 1
1 1 1 Qn
X X 0 Qn
Figure 7.10: Function table of a SR flip-flop
- 115 -
07 Flip-Flops and Applications
Data latch or D latch has the circuit shown in Fig. 7.12 and its excitation
function table is shown in Fig. 7.13. It consists of a SR latch and a data line. The
data line D is feed directly to set line of a SR latch, whilst the reset line is fed by
the complement of data line .
Input Output
Qn D Qn+1
0 0 0 1
0 1 1 0
1 0 0 1
1 1 1 0
Figure 7.13: Excitation function table of D latch
Based the excitation functional table, the Karnaugh map of the output Qn+1
shown in Fig. 7.14(a), is Qn+1 = D, whist the is equal to shown in
- 116 -
07 Flip-Flops and Applications
Fig. 7.14(b). This shall mean that the output of the D latch depends on the logic
state of data line D. The equation is also known as the characteristic equation.
The circuit of a D flip-flop is shown in Fig. 7.15 and its corresponding function
table is shown in Fig. 7.16.
Input Output
D CLK Qn+1
0 1 0 1
1 1 1 0
X 0 Qn
Figure 7.16: Function table of Data flip-flop
Like SR flip-flop and D flip-flop is also a rising edge triggered device. The
result can be shown from the timing diagram of the flip-flop shown in Fig. 7.17.
The output shows that it follows equation Qn+1 = D.
- 117 -
07 Flip-Flops and Applications
The state table and state diagram of clocked D flip-flop shown in Fig. 7.15 are
shown in Fig. 7.18 and 7.19 respectively.
Based on the state table shown in Fig. 7.18, the next state Qn+1 equation is equal
to .
7.1.3 JK Flip-Flop
is used to set the flip-flop whilst the K input is used to reset the flip-flop. With
The function table and excitation table are respectively shown in Fig. 7.21 and
Fig. 7.22 respectively.
Input Output
J K Q
0 0 Last state Last state
0 1 0 1
1 0 1 0
1 1
Figure 7.21: Function table of JK flip-flop
Using Karnaugh map for simplification, the output of next state Qn+1 is Qn+1 =
J + Qn and its corresponding truth table is shown in Fig. 7.24(a), whist
the output shown in Fig. 7.24(b) is . The output equation
is also known as the characteristic equation.
- 120 -
07 Flip-Flops and Applications
Input Output
Qn T Qn+1
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1
Figure 7.27: Excitation table of trigger flip-flop
Using Karnaugh map for simplification which is shown in Fig. 7.28(a), the
output of next state Qn+1 is Qn+1 = T + Qn = Qn T, whist output
shown in Fig. 7.28(b) is .
- 121 -
07 Flip-Flops and Applications
Based excitation table shown in Fig. 7.27, the state diagram of T flip-flop is
shown in Fig. 7.29.
The circuit of the master-slave JK flip-flop is shown in Fig. 7.31. The flip-
flop has same excitation table like the leading edge triggered JK flip-flop.
- 122 -
07 Flip-Flops and Applications
Figure 7.34: The timing diagram of master-slave flip-flop as shown in Fig. 7.33
The logic circuitry of the D flip-flop shown in Fig. 7.35 is shown in Fig. 7.36.
- 124 -
07 Flip-Flops and Applications
The corresponding truth table for the D flip-flop mentioned in Fig, 7.35 is
shown in Fig. 7.37.
Input Output
Clk D Pre Clr Q
X X 1 1 Not allowed
X X 1 0 1
X X 0 1 0
0 0 0 0
1 0 1 1
0,1 X 0 0 Q
Figure 7.37: Truth table of D flip-flop with preset and clear inputs
The timing diagram of the of D flip-flop with preset and clear inputs as shown
in Fig. 7.35 is shown in Fig. 7.38.
Figure 7.38: Timing digram of D flip-flop with preset and clear inputs
The active low preset and clr D flip-flop is shown in Fig. 7.39, which mean it
- 125 -
07 Flip-Flops and Applications
Figure 7.39: The active low D flip-flop with preset and Clr inputs
The corresponding truth table for the D flip-flop mentioned in Fig, 7.39 is
shown in Fig. 7.40.
Input Output
clk D Q
X X 0 0 Not allowed
X X 0 1 1
X X 1 0 0
0 1 1 0
1 1 1 1
0,1 X 1 1 Q
Figure 7.40: Truth table of D flip-flop with active low preset and clear inputs
The D flip-flop with disable clk input is shown in Fig. 7.41. When En is low,
the clock signal clk will not appear at the output of the AND gate because it
always low. Since the D flip-flop does not receive the clock edge, it will hold
the output.
The corresponding logic diagram of the D flip-flop with disable clk input is
shown in Fig. 7.42.
- 126 -
07 Flip-Flops and Applications
Figure 7.42: The logic diagram of D flip-flop with disable clock input
The timing diagram of the D flip-flop with disable clock input is shown in Fig.
7.43.
Figure 7.43: The timing diagram of the D flip-flop with disable clock input
You may realize by now that from the timing diagrams of the flip-flop
shown in Fig. 7.16 and Fig. 7.43, the frequency of the flip- half
-flop is a divide by 2 frequency divider.
Connecting N flip-flops in series will provide divide by 2N of the clock
frequency.
- 127 -
07 Flip-Flops and Applications
Tutorials
7.1. The input timing diagram feed to a RS flip-flop is shown below. Draw
output Q and timing for this flip-flop. Verify the output timing with the
equation Qn+1 = S + Qn and draw the timing diagram for three clock
pulse.
7.2. Use Karnaugh map to verify that the output Q of SR flip-flop follows
equation Qn+1 = S + Qn .
- 129 -
07 Flip-Flops and Applications
7.5. Describe how the trailing edge pulse trigger the set and reset of the
master-slave JK flip-flop.
7.6. Design a divide by 8 frequency divider with JK flip-flop and draw its
timing diagram.
References
1. Donald D. Givone, "Digital Principles and Designs", McGraw- Hill 2003.
2. Thomas L. Floyd, "Digital Fundamentals", Seventh Edition, Prentice-Hall
International, Inc., 2000.
3. Victor P. Nelson, H. Try Nagle, Bill D. Carroll, and J. David Irwin, "Digital
Logic Circuit Analysis & Design", Prentice-Hall Englewood Cliffs.NJ,
1995.
- 130 -