You are on page 1of 78

Prime Implicants and

Design Problems with Kmaps


CSE 1125: Digital Logic Design – Week 6
Lec Raiyan Rahman
Dept of CSE, UIU
raiyan@cse.uiu.ac.bd
CC: Lec Shadman Aadeeb

7/26/2023 LEC RAIYAN RAHMAN, DEPT OF CSE, UIU 1


Lecture Outline

• Don’t care condition and wrapping up K-maps


• Implicants and understanding the usage of Implicants
• Other Gates

Lec Raiyan Rahman, Dept. of CSE 2


10/31/2023
Don’t Care Condition

f = m(1, 5, 6, 11, 12, 13, 14) + d(4)

f = BC' + BD' + A'C'D + AB'CD

Lec Raiyan Rahman, Dept. of CSE 3


10/31/2023
Don’t Care Condition

F(A, B, C, D) = M(6, 7, 8, 9) + d(12, 13, 14, 15)

F = (A'+ C)(B' + C')

Lec Raiyan Rahman, Dept. of CSE 4


10/31/2023
Don’t Care Condition

F(A, B, C, D) = m(1, 2, 6, 7, 8, 13, 14, 15) +


d(0, 3, 5, 12)

f = AC'D' + A'D + A'C + AB

Lec Raiyan Rahman, Dept. of CSE 5


10/31/2023
P-Terms in 4 Variable K Maps

Lec Raiyan Rahman, Dept. of CSE 6


10/31/2023
Design Problems (Imp.)

Lec Raiyan Rahman, Dept. of CSE 7


10/31/2023
Design Problems (Imp.)

Lec Raiyan Rahman, Dept. of CSE 8


10/31/2023
Design Problems (Imp.)

Lec Raiyan Rahman, Dept. of CSE 9


10/31/2023
Design Problems (Imp.)

Lec Raiyan Rahman, Dept. of CSE 10


10/31/2023
Implicants and understanding the
usage of Implicants
10/31/2023 Lec Raiyan Rahman, Dept. of CSE 11
Implicants

• What are implicants?


For a boolean function, the terms for which CD 00 01 11 10
the value of the function becomes 1 AB
00
01
The implicants for this function are the terms: 11
• xy 10
• yz
• xyz
• w
• xyzw
Lec Raiyan Rahman, Dept. of CSE 12
10/31/2023
Implicants

• What are implicants?


For a boolean function, the terms for which
the value of the function becomes 1

The implicants for this function are the terms:


• xy
• yz
• Xyz
• W x y z w
• xyzw
Lec Raiyan Rahman, Dept. of CSE 13
10/31/2023
Implicants

• What are implicants?


For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• Xyz
• W x y z w
• xyzw
Lec Raiyan Rahman, Dept. of CSE 14
10/31/2023
Implicants

• What are implicants?


For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw
Lec Raiyan Rahman, Dept. of CSE 15
10/31/2023
Implicants
1
• What are implicants?
For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw 1 1

Lec Raiyan Rahman, Dept. of CSE 16


10/31/2023
Implicants
1
• What are implicants?
For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw 1 1

Lec Raiyan Rahman, Dept. of CSE 17


10/31/2023
Implicants
1
• What are implicants?
For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw 1

Lec Raiyan Rahman, Dept. of CSE 18


10/31/2023
Implicants
1
• What are implicants?
For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw 1 1 1

Lec Raiyan Rahman, Dept. of CSE 19


10/31/2023
Implicants
1
• What are implicants?
For a boolean function, the terms for which
the value of the function becomes 1 Implicants
are those values
of the inputs
for which, the output
The implicants for this function are the terms: becomes ‘1’
• xy
• yz
• w
• xyz x y z w
• xyzw 1 1 1 1

Lec Raiyan Rahman, Dept. of CSE 20


10/31/2023
Implicants

• Finding out the implicants in the kmaps:

CD 00 01 11 10
AB
00 1 1
01 1
11
10 1

Lec Raiyan Rahman, Dept. of CSE 21


10/31/2023
Implicants

• Finding out the implicants in the kmaps:

F becomes 1 when:
CD 00 01 11 10
AB ABCD is 0000
00 1 1 ABCD is 1001
01 1 ABCD is 0111
ABCD is 0010
11
10 1

Suppose this is the map obtained for a function F

Lec Raiyan Rahman, Dept. of CSE 22


10/31/2023
Implicants

• Finding out the implicants in the kmaps:

F becomes 1 when:
CD 00 01 11 10
The implicants are: AB ABCD is 0000
A’B’C’D’ 00 1 1 ABCD is 1001
AB’C’D 01 1 ABCD is 0111
A’BCD ABCD is 0010
11
A’B’CD’
10 1

Suppose this is the map obtained for a function F

Lec Raiyan Rahman, Dept. of CSE 23


10/31/2023
Implicants

• Finding out the implicants in the kmaps:


WHEN ABD is 000 then F becomes 1
F becomes 1 when:
CD 00 01 11 10
The implicants are: AB ABCD is 0000
A’B’C’D’ 00 1 1 ABCD is 1001
AB’C’D 01 1 ABCD is 0111
A’BCD ABCD is 0010
11
A’B’CD’
10 1
A’B’D’

Suppose this is the map obtained for a function F

Lec Raiyan Rahman, Dept. of CSE 24


10/31/2023
Implicants

Understanding Prime Implicants

• A prime implicant is the largest possible group of 1’s that can be


formed. The group can not be a part of another group.

Lec Raiyan Rahman, Dept. of CSE 25


10/31/2023
Implicants

Understanding Prime Implicants

• A prime implicant is the largest possible group of 1’s that can be


formed. The group can no be a part of another group.
CD 00 01 11 10
AB
00 The outer
01 rectangle
11 1 1 1 1 consists of the
prime implicants
10 1 1 1 1

Lec Raiyan Rahman, Dept. of CSE 26


10/31/2023
Implicants

Understanding Prime Implicants

• A prime implicant is the largest possible group of 1’s that can be


formed. The group can no be a part of another group.
CD 00 01 11 10
AB
00 The outer
01 rectangle
11 1 1 1 1 consists of the
prime implicants
10 1 1 1 1

Lec Raiyan Rahman, Dept. of CSE 27


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group(s)
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 28


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 29


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 30


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 31


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 32


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 33


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 34


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 35


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 36


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 37


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 38


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 39


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 40


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 41


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 • Go to a 1.
AB • Form the largest possible group(s)
00 1 1 1
with adjacent 1’s
01 1 1 • If there are more adjacent 1’s
11 1 1 remaining, then group with those
1 1 1’s too in the largest possible way.
10 • Repeat for all the other 1’s

Lec Raiyan Rahman, Dept. of CSE 42


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 43


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 44


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 45


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 46


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 47


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 48


10/31/2023
Implicants

Systematically determining all the prime implicants

CD 00 01 11 10 All the groups formed here


AB are prime implicants
00 1 1 1
01 1 1 Essential prime implicant:
11 1 1 A’C’
10 1 1
Non-Essential prime implicant:
Terms from Rectangles marked red

Get an idea on various prime implicants (click here)

Lec Raiyan Rahman, Dept. of CSE 49


10/31/2023
Implicants

Simplification of Kmap using Prime Implicants and selection rule:


• Select the Essential Prime Implicant Term
• Select the non-essential prime implicants in such ass the overlap Is reduced
• There should be at least one 1 in the non – essential prime implicants which
does not overlap

Selection Rule Description from text book:


• Minimize the overlap among prime implicants as much as possible. In
particular, in the final solution, make sure that each prime implicant
selected includes at least one minterm not included in any other
prime implicant selected.

Lec Raiyan Rahman, Dept. of CSE 50


10/31/2023
Implicants

• Simplification of Kmap using Prime Implicants and selection rule:


• Select the Essential Prime Implicant Term
• Select the non-essential prime implicants in such ass the overlap Is reduced
• There should be at least one 1 in the non – essential prime implicants which
does not overlap
CD 00 01 11 10
AB
00 1 1 1
01 1 1
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 51


10/31/2023
Implicants

• Simplification of Kmap using Prime Implicants and selection rule:


• Select the Essential Prime Implicant Term
• Select the non-essential prime implicants in such ass the overlap Is reduced
• There should be at least one 1 in the non – essential prime implicants which
does not overlap
CD 00 01 11 10
AB
00 1 1 1
01 1 1
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 52


10/31/2023
Implicants

• Simplification of Kmap using Prime Implicants and selection rule:


• Select the Essential Prime Implicant Term
• Select the non-essential prime implicants in such ass the overlap Is reduced
• There should be at least one 1 in the non – essential prime implicants which
does not overlap
CD 00 01 11 10
AB
00 1 1 1
01 1 1
11 1 1
10 1 1

Lec Raiyan Rahman, Dept. of CSE 53


10/31/2023
In a similar manner solve the following

• Example 2-11
• Exercise 2-20 (a,b,c)

Lec Raiyan Rahman, Dept. of CSE 54


10/31/2023
5 Variable K Map

10/31/2023 Lec Raiyan Rahman, Dept. of CSE 55


5 Variable K Map

• F(A,B,C,D,E)= ∑m(0,5,6,8,9,10,11,16,20,24,25,26,27)
• F(A,B,C,D,E)= ∏M (0,5,6,8,9,10,11,16,20,24,25,26,27)

Lec Raiyan Rahman, Dept. of CSE 56


10/31/2023
5 Variable K Map

• F(A,B,C,D,E)= ∑m(0,5,6,8,9,10,11,16,20,24,25,26,27)

Lec Raiyan Rahman, Dept. of CSE 57


10/31/2023
5 Variable K Map

• F(A,B,C,D,E)= ∏M (0,5,6,8,9,10,11,16,20,24,25,26,27)

Lec Raiyan Rahman, Dept. of CSE 58


10/31/2023
Finding the radix

10/31/2023 Lec Raiyan Rahman, Dept. of CSE 59


Finding the radix

Lec Raiyan Rahman, Dept. of CSE 60


10/31/2023
Finding the radix

Lec Raiyan Rahman, Dept. of CSE 61


10/31/2023
Other Gate Types

10/31/2023 Lec Raiyan Rahman, Dept. of CSE 62


Other Gate Types
• Why?
• Implementation feasibility and low cost
• Power in implementing Boolean functions
• Convenient conceptual representation
• Gate classifications
• Primitive gate - a gate that can be described using a
single primitive operation type (AND or OR) plus an
optional inversion(s).
• Complex gate - a gate that requires more than one
primitive operation type for its description
• Primitive gates have been covered .

Chapter 2 - Part 3 63
Buffer
• A buffer is a gate with the function F = X:
X F

• In terms of Boolean function, a buffer is the same as a connection!


• So why use it?
• A buffer is an electronic amplifier used to improve circuit voltage levels and
increase the speed of circuit operation.

Chapter 2 - Part 3 64
NAND Gate

• AND-Invert
X
Y F (X , Y , Z ) = X  Y  Z
Z

• Invert -OR

X
Y F (X , Y , Z ) = X + Y + Z
Z

Lec Raiyan Rahman, Dept. of CSE 65


10/31/2023
NAND Gate is a universal gate

Lec Raiyan Rahman, Dept. of CSE 66


10/31/2023
NOR gate

• OR-Invert (NOR)

X
Y F (X , Y , Z ) = X +Y + Z
Z

• Invert-AND

X
Y
Z

Lec Raiyan Rahman, Dept. of CSE 67


10/31/2023
NOR Gate is a universal gate

Lec Raiyan Rahman, Dept. of CSE 68


10/31/2023
Exclusive OR/ Exclusive NOR

• Uses for the XOR and XNORs gate include:


• Adders/subtractors/multipliers
• Counters/incrementers/decrementers
• Parity generators/checkers
• Definitions X Y = X Y +X Y
• The XOR function is:
• The eXclusive NOR (XNOR) function, otherwise
known as equivalence is: X Y = X Y +X Y

Chapter 2 - Part 3 69
Exclusive OR/ Exclusive NOR

X Y X Y X Y (X Y)
or X Y
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1

Lec Raiyan Rahman, Dept. of CSE 70


10/31/2023
Exclusive OR/ Exclusive NOR

X Y X Y X Y (X Y)
or X Y
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1

Lec Raiyan Rahman, Dept. of CSE 71


10/31/2023
XOR Identities

X 0 X X 1 X
X X =0 X X =1
X Y = Y X
(X  Y )  Z = X  (Y  Z ) = X  Y  Z

Lec Raiyan Rahman, Dept. of CSE 72


10/31/2023
WRAP UP

Lec Raiyan Rahman, Dept. of CSE 73


10/31/2023
Boolean Algebra

• Reduce the following Boolean expression to two literals:

Lec Raiyan Rahman, Dept. of CSE 74


10/31/2023
Boolean Algebra

• Prove the identity of each of the following Boolean equations, using


algebraic manipulation:

Exercise 2-3(b) +:
➢WY + W’YZ’ + WXZ + W’XY’ = WY + W’XZ’ + X’YZ’ + XY’Z

Lec Raiyan Rahman, Dept. of CSE 75


10/31/2023
Follow slides, class notes and all
resources/hand notes provided closely!

Lec Raiyan Rahman, Dept. of CSE 76


10/31/2023
All the best for the midterms!

Lec Raiyan Rahman, Dept. of CSE 77


10/31/2023
Thank You

10/31/2023 Lec Raiyan Rahman, Dept. of CSE 78

You might also like