0% found this document useful (0 votes)
18 views26 pages

Lecture 5 - Flip Flops

This lecture covers the concept of flip-flops in digital logic design, focusing on the D, JK, and T flip-flops. It explains their operations, including setting, resetting, and toggling outputs, as well as the use of asynchronous inputs for preset and clear functions. The lecture also includes characteristic tables and equations for different types of flip-flops.

Uploaded by

pijushroy0198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views26 pages

Lecture 5 - Flip Flops

This lecture covers the concept of flip-flops in digital logic design, focusing on the D, JK, and T flip-flops. It explains their operations, including setting, resetting, and toggling outputs, as well as the use of asynchronous inputs for preset and clear functions. The lecture also includes characteristic tables and equations for different types of flip-flops.

Uploaded by

pijushroy0198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Digital Logic and System Design

(CSE 1823)

Lecture- 5
Sequential Circuits: Flip-Flops

Dr. Md. Shafiqul Islam


Professor, CSE, DUET, Gazipur

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-1
Outline of Lecture- 5
 Flip-flops

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-2
Flip-Flops
 The most economical and efficient flip–flop constructed is the
edge–triggered D flip–flop.
 It requires smallest number of gates.
 Other types of flip – flops can be constructed by using the D flip–
flop and external logic.
 JK flip – flops
 T flip – flops
 There are three operations that can be performed with a flip-flop:
 Set it to 1
 Reset it to 0
 Complement its output

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-3
Flip-Flops
 JK Flip–Flop (named in honor of the inventor of the device, Jack Kilby)
 Performs all three operations. J Q
 When J = 1, sets the flip–flop to 1.
 When K = 1, resets the flip–flop to 0. K Q

J
D Q Q
K
CLK Q Q

D = JQ + KQ
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-4
Flip-Flops
 Operation 1
 When J = 1 and K = 0,
 D = 1.Q′ + 1.Q (Post2b) => D = Q′ + Q (Post5a) => D = 1
 Next clock edge sets the output to 1.

J
D Q Q
K
CLK Q Q

D = JQ + KQ
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-5
Flip-Flops
 Operation 2
 When J = 0 and K = 1,
 D = 0.Q′ + 0.Q (Theo2b) => D = 0 + 0 => D = 0
 Next clock edge sets the output to 0.

J
D Q Q
K
CLK Q Q

D = JQ + KQ
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-6
Flip-Flops
 Operation 3
 When J = 1 and K = 1,
 D = 1.Q′ + 0.Q (Post2b) => D = Q′ + 0.Q (Theo2b) => D = Q′ + 0 (Post2a)
=> D = Q′
 Next clock edge complements the output.

J
D Q Q
K
CLK Q Q

D = JQ + KQ
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-7
Flip-Flops
 When J = 0 and K = 0,
 D = 0.Q′ + 1.Q (Theo2b) => D = 0 + 1.Q (Post2b) => D = 0 + Q (Post2a)
=> D = Q
 Next clock edge the output is unchanged.

J
D Q Q
K
CLK Q Q

D = JQ + KQ
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-8
Flip-Flops
 T (toggle) Flip–Flop
 Complementing flip–flop.
 Can be obtained from a JK flip–flop. T J Q
 When inputs J and K are tied together.
 Useful for designing binary counters.
K Q

D = JQ′ + K′Q
D = TQ′ + T′Q = T  Q

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-9
Flip-Flops
 T (toggle) Flip–Flop Operation
 When T = 0 (J = K = 0)
 A clock edge does not change the output. T J Q
 When T = 1 (J = K = 1)
 A clock edge complements the output.
K Q

D = JQ′ + K′Q
D = TQ′ + T′Q = T  Q

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-10
Flip-Flops
 T (toggle) Flip–Flop
 Can be constructed with a D flip–flop and an XOR gate.
 When T = 0 then D = Q
 No change in the output.
 When T = 1 then D = Q′
T D Q
 Output complements

D=TQ

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-11
Flip-Flops
 T (toggle) Flip–Flop

T J Q T D Q

Q
K Q

(a) From JK flip-flop (b) From D flip-flop

T Q

(c) Graphic Symbol


Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-12
Flip-Flops
 Flip-flop Characteristics Tables

D Q D Q(t+1)
0 0 Reset
Q 1 1 Set

J K Q(t+1)
J Q 0 0 Q(t) No change
0 1 0 Reset
K Q 1 0 1 Set
1 1 Q′(t) Toggle

T Q T Q(t+1)
0 Q(t) No change
Q 1 Q′(t) Toggle
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-13
Flip-Flops
 Flip-flop Characteristics Equations

D Q D Q(t+1)
0 0 Q(t + 1) = D
Q 1 1

J K Q(t+1)
J Q 0 0 Q(t)
0 1 0 Q(t + 1) = JQ′ + K′Q
K Q 1 0 1
1 1 Q′(t)

T Q T Q(t+1)
0 Q(t) Q(t +1) = T  Q
Q 1 Q′(t)
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-14
Flip-Flops
 Analysis / Derivation of Characteristics Equation

J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q
0 1 0 Reset
0 1 1
K Q 1 0 0 Set
1 0 1
1 1 0 Toggle
1 1 1

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-15
Flip-Flops
 Analysis / Derivation of Characteristics Equation

J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q
0 1 0 0 Reset
0 1 1 0
K Q 1 0 0 Set
1 0 1
1 1 0 Toggle
1 1 1

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-16
Flip-Flops
 Analysis / Derivation of Characteristics Equation

J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q
0 1 0 0 Reset
0 1 1 0
K Q 1 0 0 1 Set
1 0 1 1
1 1 0 Toggle
1 1 1

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-17
Flip-Flops
 Analysis / Derivation of Characteristics Equation

J K Q(t) Q(t+1)
0 0 0 0 No change
0 0 1 1
J Q
0 1 0 0 Reset
0 1 1 0
K Q 1 0 0 1 Set
1 0 1 1
1 1 0 1 Toggle
1 1 1 0

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-18
Flip-Flops
 Analysis / Derivation of Characteristics Equation

J K Q(t) Q(t+1)
0 0 0 0
0 0 1 1 K
J Q
0 1 0 0 0 1 0 0
0 1 1 0 J 1 1 0 1
K Q 1 0 0 1 Q
1 0 1 1
1 1 0 1
1 1 1 0

Q(t+1) = JQ′ + K′Q

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-19
Flip-Flops
 Some flip–flops have asynchronous inputs that are used to force
the flip–flop to a particular state independent of the clock.
 The input that sets the flip–flop to 1 is called preset.
 The input that clears the flip–flop to 0 is called clear or direct
reset.
 When power is on in a digital system, the state of the flip-flop is
unknown.
 The direct inputs are useful for bringing all flip–flops in the
system to a known starting state prior to the clocked operation.

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-20
Flip-Flops
 Asynchronous Reset

D Q R′ D CLK Q(t+1)
0 x x 0
Q 1 0 ↑ 0
R 1 1 ↑ 1
Reset

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-21
Flip-Flops
 Asynchronous Preset and Clear

Preset

PR PR′ CLR′ D CLK Q(t+1)


D Q 1 0 x x 0

Q
CLR
Reset

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-22
Flip-Flops
 Asynchronous Preset and Clear

Preset

PR PR′ CLR′ D CLK Q(t+1)


D Q 1 0 x x 0
0 1 x x 1
Q
CLR
Reset

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-23
Flip-Flops
 Asynchronous Preset and Clear

Preset

PR PR′ CLR′ D CLK Q(t+1)


D Q 1 0 x x 0
0 1 x x 1
Q 1 1 0 ↑ 0
CLR
Reset

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-24
Flip-Flops
 Asynchronous Preset and Clear

Preset

PR PR′ CLR′ D CLK Q(t+1)


D Q 1 0 x x 0
0 1 x x 1
Q 1 1 0 ↑ 0
CLR 1 1 1 ↑ 1
Reset

Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-25
Dr. Md. Shafiqul Islam, Professor, Dept. of CSE, DUET, Gazipur Digital Logic and System Design Lecture- 5-26

You might also like