Академический Документы
Профессиональный Документы
Культура Документы
FLIP-FLOPS
Objectives
Sequential circuits
Registers
Calculator
Flip-Flops
7.1
104
Sequential Circuit
Logic circuits are classified in two categories. The logic circuits considered
thus far have been combinational circuits, whose output is a function of only
the present input. The basic building block of combinational circuits is the
logic gate.
Input
Ouput
Combinational
Logic Gates
Ouput
Combinational
Logic Gates
Memory
S
R
Input
S
0
0
0
0
1
1
1
1
R
0
0
1
1
0
0
1
1
Present
State
Q
0
1
0
1
0
1
0
1
Next
State
Q*
0
1
0
0
1
1
x
x
SR
Latch
Q
Q
The equation for SR latch is Q* = S + R.Q . We can classify the operation of the
latch into three modes.
Mode 1:
S=R=0. Q*=Q. The next state Q* is equal to the present state Q. So, there is no
change of state.
Mode 2:
S=1, R=0. Q* = 1, representing set operation.
Mode 3:
S=0, R=1. Q*=0, representing reset operation.
The truth table for SR latch can be written as:
S R Q Q
Mode
Q Q
Hold
Re set
Set
Pr ohibited(invalid)
Example 1:
Assume that Q=0 initially. Determine the Q waveform for the SR latch.
S
R
Q
Reset
Initial state
Q=0
Hold
Set
Hold
Reset
Hold
Flip-Flops
106
7.3 SR Flip-Flop
The operation of SR flip-flop is similar to that of the simple SR latch. The
characteristic equation is Q* = S + R.Q . The difference is that, the latch output
reacts immediately to any output changes, while the flip-flop output changes
are controlled by the clock pulse CLK. A flip-flop with a small triangle on its
CLK input indicates that this input is activated only when the clock changes
from a 0 to a 1 () occurs. This is known as the positive-going transition or
positive-edge triggered.
Input
S
SET
CLR
S
0
0
0
0
1
1
1
1
Present
State
Q
0
1
0
1
0
1
0
1
R
0
0
1
1
0
0
1
1
CLK
Next
State
Q*
0
1
0
0
1
1
x
x
CLK S R Q Q
0 0 Q Q
0
1
1
1
0
1
0
1
0
1
0
0
Mode
Hold
Re set
Set
Pr ohibited (invalid )
Example 1:
Assume that Q=0 initially. Determine the Q waveform for the SR flip-flop.
CLK
Set
Set
Hold
Reset
S
R
Q
Hold Set
Hold Reset
7.4 D Flip-Flop
The D flip-flop has only a single data input D and a clock input CLK. The SR
flip-flop can be converted to a D flip-flop by adding an inverter. Data is
transferred from the input D to the output Q on the 0 1 transition of the
clock pulse.
SET
S
R
CLR
SET
CLR
Q
Q
CLK D Q
0
Example 1:
Assume that Q=0 initially. Determine the Q waveform for the D flip-flop.
CLK
D
Q
7.5 D Latch
The edge-triggered D flip-flop in 7.4 will respond to the D input on the 0 to 1
clock transition. The D latch operates differently. It has an enable input E.
When E=0, the output Q is latch to the present state and cannot change even
if D changes. When E=1, the Q output is equal to D.
D
E D
Q
Q
0
1
x
0
Nochange
0
Example 1:
Assume that Q=0 initially. Determine the Q waveform for the D flip-flop.
1
E
D
Q
Flip-Flops
108
789
456
123
0
Encoder
Decoder
DISP1
S9
74147
S8
S7
S6
S5
S4
S3
S2
S1
S0
I9
I8
I7
I6
I5
I4
I3
I2
I1
abcdefg.
74LS48
A3
A2
A1
A0
A3
A2
A1
A0
g
f
e
d
c
b
a
test
RBI RBO
789
456
123
0
4-Bit
Storage
Register
Encoder
Decoder
A 4-bit storage register can be constructed using 4 D flip-flop. The input data
is transferred into the D flip-flop on a 0 1 clock pulse.
9
4321
4321
D0
D1
D2
D3
5V
+V
Q0
Q1
Q2
Q3
CP
Load
TP1
R2
1k
9
4321
4321
D
CP
D
CP
D
CP
D
CP
V1
5V
+V
Load
R1
1k
Q
_
Q
Q
_
Q
Q
_
Q
Q
_
Q
Flip-Flops
110
SET
CLR
1
2
3
4
5
6
7
8
9
0
1
2
MSB
A
3
B
4
Enkoder
C
5
LSB
D
6
7
8
9
SET
CLR
SET
CLR
SET
CLR
Dekoder
Gnd
S9
74147
S8
S7
S6
S5
S4
S3
S2
S1
S0
I9
I8
I7
I6
I5
I4
I3
I2
I1
abcdefg.
74LS48
A3
A2
A1
A0
D0
D1
D2
D3
Q0
Q1
Q2
Q3
CP
A3
A2
A1
A0
g
f
e
d
c
b
a
test
RBI RBO
7 8 9
4 5 6
1 2 3
0
Encoder
Control
Load
Register
B
Register
A
Add/
Subtract
Control
4 Bit
Adder
Decoder
e
a
g
Flip-Flops
112
7 8 9
4 5 6
1 2 3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
A MSB
B
C LSB
D
CLR
SET
CLR
SET
CLR
SET
CLR
SET
CLR
SET
CLR
SET
CLR
SET
CLR
SET
Register B
Control Load
Load B
Load A
Register A
Add/Subtract
Control
A1
B4
A4
B3
4 Bit Adder
A3
B2
A2
B1
C
D
1
7 Segment
Decoder
a
b
c
d
e
f
g
Flip-Flops
114
Exercises
1. Assume that Q=0 initially. Determine the Q waveform for the SR latch.
S
R
Q=0
Mode
2. Assume that Q=0 initially. Determine the Q waveform for the SR flip-flop.
CLK
S
R
Q=0
Mode
3. Assume that Q=0 initially. Determine the Q waveform for the D flip-flop.
CLK
D
Q=0
Mode