Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DIGITAL ELECTRONICS
CHAPTER 4:
FLIP-FLOPs AND RELATED DEVICES
PART 1:
LATCH AND FLIP FLOP
Sequential Circuits
Combinational output depends only on the input.
Do not have memory
Cannot store state
Asynchronous
Changes occur independently
Potentially faster
Harder to analyze
Latch
Latch is a type of temporary storage device that has two
stable (bistable) state: SET and RESET:
SET means that the output (Q) is HIGH
RESET means that the output (Q) is LOW
Type of latches:
SR / SR Latch (SR = Set-Reset)
Gated SR Latch
Gated D Latch
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
SR Latch
R
Function Table
Function
Qo
Hold
Reset
Set
Not allowed
Graphical symbol
SR Latch
SR
0X
Detailed Function
Table
Q+
Excitation Table
Q+
01
10
1
X0
State Transition
Diagram:
The excitation table in
graphical form
SR Latch
Function Table
S
Function
Qo
Hold
Reset
Set
Not allowed
Gated SR Latch
Add Control Input
Typically, control signal is referred to as a clock
EN
c) Block Diagram
a) Logic Diagram
b) Block Diagram
Gated SR Latch
1
EN
0
1
R
0
S
EN
0
R
1
?
Q
0
Graphical symbol
1
?
Q
0
Time
Gated D Latch
D
(Data)
S
Q
EN
Q
c) Block Diagram
Gated D Latch
D
EN
EN
D
Q
EN = 1
EN = 1
EN = 1
EN = 1
D Latch
0
Detailed Function
Table
Excitation Table
Q+
Q+
1
1
State Transition
Diagram
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Flip-Flops
Flip flops are bistable devices and performs a function
same as latches.
However, the output changes only during the rising edge
(positive edge-triggered) or falling edge (negative edgetriggered) of the clock pulse.
There are 4 types of flip-flop:
a) S-R flip flop
b) D flip flop
c) J-K flip flop
d) T flip flop
16
Flip-Flops
Ensure only one transition.
Two major types:
1. Master-Slave
Two stage
Output not changed until clock disabled
2. Edge triggered
Change happens when clock level changes
Edge-Triggered Flip-Flops
Synchronous input
Change state either at positive edge or negative edge
of a clock pulse.
S-R Flip-Flop
Positive-edge S-R Flip Flop:
S-R Flip-Flop
Edge-triggeringpulse transition
detector, produces
a very shortduration spike
during the
transition of the
clock pulse.
D Flip-Flop
1
P3
P1
Clock
P2
Clock
P4
A positive-edge-triggered D flip-flop
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
D Flip-Flop
Positive-edge D Flip Flop:
D Latch vs D Flip-Flop
D
Clock
Qa
Clk
EN Q
Qa
Clock
D
Qb
Qa
Qb
Qc
Qc
Qb
Qc
T Flip-Flop
Positive-edge T Flip Flop:
24
T Flip-Flop
Exercise:
Determine the Q output waveforms flip flop
in Figure (a) for T and CLK inputs in Figure (b)
below. Assume that flip flop initially RESET.
Figure (a)
CLK
T
Q
CLK
T
Q
Figure (b)
25
JK Flip-Flop
0
1
0
1
Q (t )
0
1
Q (t )
JK Flip-Flop
Positive-edge J-K Flip Flop:
JK Flip-Flop
Negative-edge J-K Flip Flop:
JK Flip-Flop
Detailed
Function Table
J K Q
Q+
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
SR
0X
0
Excitation Table
Q
Q+ J K
0 X
1 X
X 1
X 0
X1
1
X0
State Transition
Diagram
1X
Symbols Edge-Triggered
Asynchronous Inputs
State of the flip flop change independent of the
clock.
Input
Output
Comment
Invalid
SET
RESET
Q0
Toggle
Asynchronous Inputs
Example:
Input
Comment
Invalid
SET
RESET
Q0
Toggle
Output
Q
Flip-flops Applications
Parallel data storage
Flip-flops Applications
Frequency division
Flip-flops Applications
Counting
PART 2:
COUNTER
1. Type of sequence
2. Modulus number of states
(MOD number is equal to the number of states that the counter goes
through before recycling. Adding FFs will increase the MOD number)
3. Number of flip-flops
Asynchronous Counter
Operation
Asynchronous Counter
Operation
Asynchronous binary counter
a) 2-bit asynchronous binary counter
b) 3-bit asynchronous binary counter
c) 4-bit asynchronous binary counter
Example:
A counter is needed will count the number of
items passing on the conveyor belt. A photocell
and light source combination is used to
generate a single pulse each time crosses its
path. The counter must be able to count as
many as one thousand items. How many FF
required?
Tclock N x tpd
PART 3:
SHIFT REGISTER
Shift Register
A type of sequential logic circuit, mainly for storage of digital
data.
They are a group of flip-flops connected in a chain so that
the output from one flip-flop becomes the input of the next
flip-flop.
Most of the registers possess no characteristic internal
sequence of states.
All the flip-flops are driven by a common clock, and all are
set or reset simultaneously.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Operation: The register is first cleared, forcing all four outputs to zero. The
input data is then applied sequentially to the D input of the first flip-flop on the
left (FF0). During each clock pulse, one bit is transmitted from left to
right. Assume a data word to be 1001. The least significant bit of the data has
to be shifted through the register from FF0 to FF3.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Waveforms
A four-bit parallel in - serial out shift register is shown below. The circuit uses D
flip-flops and NAND gates for entering data (i.e. writing) to the register.
D0, D1, D2 and D3 are the parallel inputs, where D0 is the most significant bit
and D3 is the least significant bit. To write data in, the mode control line is taken
to LOW and the data is clocked in. The data can be shifted when the mode
control line is HIGH as SHIFT is active high. The register performs right shift
operation on the application of a clock pulse.
Waveforms
For parallel in - parallel out shift registers, all data bits appear on the parallel
outputs immediately following the simultaneous entry of the data bits. The
following circuit is a four-bit parallel in - parallel out shift register constructed by
D flip-flops.
The D's are the parallel inputs and the Q's are the parallel outputs. Once the
register is clocked, all the data at the D inputs appear at the corresponding Q
outputs simultaneously.
Waveforms