CPCS202 - The Lab Note

King Abdul Aziz University
Faculty of Computing and Info Tech
Computer Science Department
LAB MANUAL
CPCS 211
Digital Logic Design
Prepared By:
Aman Ullah
2012(1) - 1433
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Statement Purpose:
In this lab we shall discuss about the Karnaugh Maps, two-variable, three-variable, four-variable, fivevariable Karnaugh Maps, Simplification of Boolean functions using K-Maps, Simplification in Sum of
Products and Product of Sums form, NAND and NOR implementation of Boolean functions, Finding
Prime Implicants, Essential Prime Implicants and Don’t Care Conditions.
Activity Outcomes:
The students will learn about constructing Karnaugh Maps for two-, three-, four- and five-variables. They
will learn how to simplify any Boolean function using Karnaugh Maps. They will also be familiarized with
simplifying the functions in Sum of Products as well as Product of Sums, using K-Maps. The students will
also be able to implement any Boolean function using only NAND or NOR gates. They will also be able to
find Prime Implicants and Essential Prime Implicants in order to get the simplified Boolean expression.
They will also learn how to simplify a Boolean function containing Don’t Care conditions.
Instructor Note:
Read the lab notes carefully and thoroughly. All the examples have been solved in an easy to understand
manner. You should not find it difficult to learn the topics given in these lab notes. Try to solve all the
exercises yourself that are given at the end of notes. These exercises will certainly help you achieving the
objectives of this lab.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Karnaugh Map:
 Karnaugh map provides a very simple and straight forward method of simplifying the
Boolean functions. The resultant minimized Boolean function will be used to design
logic diagram.
 This method was first proposed by Veitch and later slightly modified by Karnaugh.
That is why, it is called “Veitch diagram” or “Karnaugh map”.
 The map is a diagram made up of squares. Each square represents one minterm.
Two-Variable Karnaugh Map:
 A two-variable Karnaugh Map is shown below:
B
A
m0
m1
m2
m3
B
B
0
1
A
0
A
A'B'
A'B
AB'
AB
1
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
 Note that A appears primed in row 0 and unprimed in row 1. Similarly B appears
primed in column 0 and unprimed in column 1.
 The function F=AB is shown in the following fig (a). Since AB is equal to m3,
therefore 1 is placed inside the square that belongs to m3.
 Similarly the function F = A + B is represented in the following fig (b) by three
squares marked with 1 because A is unprimed in row 1 and B is unprimed in column
1. Moreover, we can write AB as
A + B = A.(B + B’) + B.(A + A’)
= AB + AB’ + AB + A’B = AB + AB + A’B + AB’
= AB + A’B + AB’ = 11 + 01 + 10 = m3 + m1 + m2 = m1 + m2 + m3
That is why we have placed 1’s in the squares of m1 , m2 and m3.
B
B
0
1
A
0
1
A
1
Fig (a) F = AB
B
B
0
1
A
1
0
A
1
1
1
Fig (b) F = A + B
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Three-Variable Karnaugh Map:
 There are 8 minterms for 3 variables. Therefore a three-variable K-Map consists of
eight squares.
 A three-variable Karnaugh Map is shown below:
B
BC
A
0
A
1
00
01
11
10
m0
m1
m3
m2
m4
m5
m7
m6
C
 Note that the minterms are arranged in a sequence similar to reflection code. The
characteristic of this sequence is that only one bit changes from 1 to 0 or 0 to 1, in the
listing sequence.
 The following figure shows the relationship between the squares and the three
variables:
B
BC
00
A
0
A
1
01
11
10
A’B’C’
A’B’C
A’BC
A’BC’
AB’C’
AB’C
ABC
ABC’
C
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Example:
Simplify the following Boolean function using K-Map.
F = A’BC + A’BC’ + AB’C’ + AB’C
Solution:
Since
F = A’BC + A’BC’ + AB’C’ + AB’C
= 011 + 010 + 100 + 101
= m3 + m2 + m4 + m5
= ∑(2, 3, 4, 5)
We shall mark the squares in the three-variable map by 1’s whose minterms are given
in the above function.
B
B'A
BC
A
A
AB’
00
1
01
11
10
1
1
1
C
 We combine the adjacent 1’s to form two rectangles. Since the upper rectangle
lies in the place where A is primed and B is unprimed, therefore this rectangle
represents the area enclosed by A’B. (Since this rectangle lies in the area of C
and C’, therefore they cancel each other).
 Similarly, the lower rectangle lies in the place where A is unprimed and B is
primed, therefore this rectangle represents the area enclosed by AB’. (Since this
rectangle lies in the area of C and C’, therefore they cancel each other).
 So, the simplified Boolean function is F = A’B + AB’
Example:
Simplify the following Boolean function using K-Map.
F = X’YZ + XY’Z’ + XYZ + XYZ’
Solution:
Since
F = X’YZ + XY’Z’ + XYZ + XYZ’
= 011 + 100 + 111 + 110
= m3 + m4 + m7 + m6
= ∑(3, 4, 6, 7)
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
We shall mark the squares in the three-variable map by 1’s whose minterms are given
in the above function.
Y
YZ
YZ
X
00
01
11
10
1
X
XZ’
1
1
1
Z
 We combine the adjacent 1’s to form two rectangles. Since the vertical
rectangle lies in the place where Y and Z are unprimed, therefore this rectangle
represents the area enclosed by YZ. (Since this rectangle lies in the area of X
and X’, therefore they cancel each other).
 Similarly, the lower extreme squares lie in the place where X is unprimed and Z
is primed, therefore these squares represent the area enclosed by XZ’. (Since
this rectangle lies in the area of Y and Y’, therefore they cancel each other).
 So, the simplified Boolean function is F = XZ’ + YZ
Example:
Simplify the following Boolean function using K-Map.
F = A’C + A’B + AB’C + BC
Solution:
Since some of the terms of the given Boolean function have less than three literals,
therefore we shall first complete the missing variables in all the terms of the function
as
F = A’C.(B + B’) + A’B.(C + C’) + AB’C + BC.(A + A’)
= A’BC + A’B’C + A’BC + A’BC’ + AB’C + ABC + A’BC
=011 + 001 + 011 + 010 + 101 + 111 + 011
= m3 + m1 + m3 + m2 + m5 + m7 + m3
= ∑(1, 2, 3, 5, 7)
The K-Map for this function is as follows:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
B
A’B
BC
00
A
A
01
11
10
1
1
1
1
1
C
C
 The simplified Boolean function is F = A’B + C
Example:
Simplify the following Boolean function using K-Map.
F(X, Y, Z) = ∑(0, 2, 4, 5, 6)
Solution:
Here the given function is given in Sum of Minterms. The corresponding squares to
the given decimal numbers are marked with 1’s as shown below:
Y
Z'
YZ
X
00
01
11
1
1
X
1
10
1
1
XY’
Z
The simplified Boolean function is F = XY’ + Z’
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Four-Variable Karnaugh Map:
 Four variable Karnaugh map contains 24 = 16 squares.
 A four-variable Karnaugh Map is shown below:
m0
m1
m3
m2
m4
m5
m7
m6
m12
m13
m15
m14
m8
m9
m11
m10
y
yz
11
10
00
01
w’x’y’z’
w’x’y’z
w’x’yz
w’x’yz’
01
w’xy’z’
w’xy’z
w’xyz
w’xyz’
11
wxy’z’
wxy’z
wxyz
wxyz’
10
wx’y’z’
wx’y’z
wx’yz
wx’yz’
wx
00
w
x
z
 The rows and columns in the above K-Map are numbered in a reflected code
sequence, with only one digit changing its value between two adjacent rows or
columns.
 The minterm corresponding to each square can be obtained by concatenating the
row number with the column number. For example, the numbers of the third
row(i.e. 11) and the second column (i.e. 01), when concatenated, give the binary
number 1101, which is the binary equivalent of the decimal 13. Thus the square
in the third row and second column represents the minterm m13 i.e. the term
wxy’z.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
 In four variables, map is considered to lie on a surface with the top and bottom
edges as well as left and right edges touching each other to form adjacent
squares. For example, m0 and m2 are adjacent to each other. Similarly m3 and
m11 are adjacent to each other
 The larger the number of squares combined, the less the number of literals you
will get in the minimized function.
Example:
Simplify the following Boolean function using K-Map.
F(W, X, Y, Z) = ∑(0,1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
Solution:
Here the given function is given in Sum of Minterms. The corresponding squares to
the given decimal numbers are marked with 1’s as shown below:
y
w’z’
yz
11
10
00
01
1
1
1
1
1
1
11
1
1
1
10
1
1
wx
00
01
w
x
xz’
y'
z
So, the simplified Boolean function is F = Y’ + XZ’ + W’Z’
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Example:
Simplify the following Boolean function using K-Map.
F = A’B’C’ + B’CD’ + A’BCD’ + AB’C’
Solution:
Since the given function has four variables, therefore we shall first of complete the
missing variables in each and every term of the function. So,
F = A’B’C’.(D + D’) + B’CD’.(A + A’) + A’BCD’ + AB’C’.(D + D’)
= A’B’C’D + A’B’C’D’ + AB’CD’ + A’B’CD’ + A’BCD’ + AB’C’D +
AB’C’D’
= 0001 + 0000 + 1010 + 0010 + 0110 + 1001 + 1000
= m1 + m0 + m10+ m2 + m6 + m9 + m8
= ∑(0, 1, 2, 6, 8, 9, 10 )
The K-Map for this function is as follows:
C
A’CD’
CD
AB
00
00
01
1
1
11
10
1
1
01
B
11
A
10
B’C’
1
1
1
D
B’D’
So, the simplified Boolean function is F = A’CD’ + B’C’ + B’D’
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Five-Variable Karnaugh Map:
 Five variable Karnaugh map contains 25 = 32 squares.
 A five-variable Karnaugh Map is shown below:
CDE
111
101
100
m6
m7
m5
m4
m10
m14
m15
m13
m12
m27
m26
m30
m31
m29
m28
m19
m18
m22
m23
m21
m20
000
001
011
010
00
m0
m1
m3
m2
01
m8
m9
m11
11
m24
m25
m16
m17
AB
C
110
B
A
10
D
E
E
 A five variable K-Map must be thought to consist of two four variable maps,
which can be recognized from the bold lines in the center of the map. It may
also be considered as the center of a book with each half of the map being a
page. When this book is closed, two adjacent squares will fall one on the other.
So, minterm m31 in five variable map is adjacent to minterms m30, m15, m29, m23
and m27.
Example:
Simplify the following Boolean function, using Karnaugh Map.
F (A, B, C, D, E) = ∑ (0, 2, 4, 6, 9, 11, 13, 15, 17, 21, 25, 27, 29, 31)
Solution:
The given function is in Sum of Minterms form. The corresponding squares to the
given decimal numbers are marked by 1’s as shown below:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
C
CDE
AB
000
001
011
110
1
1
A
010
111
101
100
A’B’E’
1
1
1
1
1
1
1
1
1
1
1
BE
B
1
AD’E
D
E
E
The simplified Boolean function is F = AD’E + BE + A’B’E’
Note:
The four 1’s in the top row are all adjacent and can be combined to give the minterm
A’B’E’.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Product of Sum Simplification
 The 1’s placed in the squares of the K-Map represent the minterms of the
function.
 The minterms not included in the function denote the complement of the
function.
 So, we can represent the complement of the function in the map by marking
them with 0’s.
 When we combine the valid adjacent 0’s in the map, we get the complement of
the simplified function i.e. F’.
 Again taking the complement of both sides, will give us the simplified Boolean
function in Product of Sum form (By De Morgan’s rules).
Example:
Simplify the following Boolean function in
(i)
(ii)
Sum of Product and
Product of Sum
F(A, B, C, D) = ∑(0, 1, 2, 5, 8, 9, 10)
Solution:
(i)
Since the function is given in Sum of Minterms, therefore we shall mark these
terms by 1’s in the K-Map as follows:
C
B’D’
CD
AB
00
A’C’D
00
01
1
1
11
10
1
1
01
B
11
A
10
B’C’
1
1
1
D
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Combining 1’s in the map, we get F = A’C’D + B’C’ + B’D’
which is the required simplified expression in Sum of Product form.
(ii)
Now we mark the rest of the squares in the above map by 0’s as follows:
C
AB
CD
CD
00
11
01
0
00
BD’
01
11
10
0
0
0
A
0
0
0
0
B
0
10
D
AB
Combining 0’s in the map, we get F’ = AB + CD + BD’
Taking complement on both sides, we get
(F’)’ = (AB + CD + BD’)’
F = (AB)’ . (CD)’ . (BD’)’
= (A’ + B’).(C’ + D’).(B’ + D)
Which is the required simplified expression in Product of Sum form.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Example:
Consider the truth table that defines a function F as
X
Y
Z
F
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
0
1
0
Obtain the simplified function in Sum of product as well as in Product of Sum form.
Solution:
In Sum of Minterms, the above function is expressed as
F(X, Y, Z) = ∑ (1, 3, 4, 6)
In Product of Maxterms, it can be expressed as
F(X, Y, Z) = Π (0, 2, 5, 7)
Thus representing the minterms by 1’s and maxterms by 0’s, we draw the following
K-Map:
X’Z
Y
X’Z’
YZ
X
X
00
01
11
10
0
1
1
0
1
0
0
XZ
Z
1
XZ’
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
 Combining 1’s in the above map, we get
F = X’Z + XZ’
Which is the required simplified expression in Sum of Product form.
 Now combining 0’s in the above map, we get
F’ = XZ + X’Z’
 Taking complement on both sides, we get
(F’)’ = (XZ + X’Z’)’
F = (XZ)’ . (X’Z’)’
= (X’ + Z’).(X + Z)
Which is the required simplified expression in Product of Sum form.
Important Note:
 To enter a function expressed in Product of Sum in the map, take the
complement of the function and from it find the squares to be marked
with 0’s.
 For example, the function
F = (A’ + B’ + C)(B + D)
can be entered in the map by first taking its complement, which gives us
F’ = ABC’ + B’D’
 Then placing 0’s in the squares representing the above minterms of F’.
The remaining squares are marked with 1’s.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
NAND and NOR Implementation:
Digital circuits are more frequently constructed with NAND or NOR gates than with
AND and OR gates. The reason is that NAND and NOR gates are less heat producing
and easier to fabricate (constructed / manufactured) with electronic components. These
are the basic gates used in all IC digital logic families.
Before, we construct digital circuits with NAND and NOR gates, we should know
about two equivalent graphic symbols these gates. For example, two graphic symbols
for NAND gate are as follows:
AND-INVERT
INVERT-OR
Here small circles denote complement.
Similarly, two equivalent graphic symbols for NOR gates are as follows:
OR-INVERT
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
INVERT-AND
A one input NAND or NOR gate behaves like an inverter.
NAND-Implementation:
 The implementation of a Boolean function with NAND gates requires that the function
should be simplified in Sum of Product form.
 For example, if we are to implement the function F = AB + CD with NAND gates
only, we can do it as follows:
 The above function can also be implemented using the other logical symbol of NAND
gate at second level as
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Note: The small circles at both ends of the same line cancel each other. So, we can get
the implementation of the same function using AND and OR gates as follows:
Example:
Implement the following function with NAND gates only.
F(X, Y, Z) = ∑ (0, 6)
Solution:
Step 1:
First of all we shall simplify the function in Sum of Product form, using K-Map as
Y
Z
YZ
X
X’Y’Z’
X
00
01
11
10
1
0
0
0
0
0
0
1
XY’
Z
X’Y
XYZ’
Combining 1’s, we get
F = X’Y’Z’ + XYZ’
Which is in Sum of Product form.
Step 2:
At the first level, draw a NAND gate for each product term of the function.
Step 3:
At the second level, draw a single NAND gate (using the AND-Invert or Invert-OR
graphic symbol).
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Note:
If there is a term with a single literal, then use a one input NAND gate as an inverter at
the first level or just complement the literal and apply it as an input to the second level
NAND gate.
So, the two level NAND implementation of the simplified function
F = X’Y’Z’ + XYZ’ is as follows:
Second Method:
Combining 0’s in the above K-Map, we get
F’ = XY’ + X’Y + Z
Taking complement on both sides, we get
(F’)’ = (XY’ + X’Y + Z)’
F = (XY’ + X’Y + Z)’
The two level NAND implementation for generating F’ is as follows:
Taking one or two input NAND gate at the third level will give you the function F.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
NOR Implementation:
The implementation of a Boolean function with NOR gates requires that the function
should be simplified in Product of Sum form.
Example:
Implement the following function with NOR gates only.
F(X, Y, Z) = ∑ (0, 6)
Solution:
Step 1:
First of all we shall simplify the function in Product of Sum form, using K-Map as
Y
Z
YZ
X
X’Y’Z’
X
00
01
11
10
1
0
0
0
0
0
0
1
XY’
Z
X’Y
XYZ’
Combining 0’s, we get
F’ = XY’ + X’Y + Z
Taking complement on both sides, we get
(F’)’ = (XY’ + X’Y + Z)’
F = (XY’)’.( X’Y)’.( Z)’ = (X’ + Y).(X + Y’).Z’
Which is in Product of Sum form.
Step 2:
At the first level, draw a NOR gate for each sum term of the function.
Step 3:
At the second level, draw a single NOR gate (using the OR-Invert or Invert-AND
graphic symbol).
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Note:
If there is a term with a single literal, then use a one input NOR gate as an inverter at
the first level or just complement the literal and apply it as an input to the second level
NOR gate.
So, the two level NOR implementation of the simplified function
F = (X’ + Y).(X + Y’).Z’ is as follows:
The above function can also be implemented using the other logical symbol of NAND
gate at second level as
Note: The small circles at both ends of the same line cancel each other. So, we can get
the implementation of the same function using AND and OR gates as follows:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Second Method:
Combining 1’s in the above K-Map, we get
F = X’Y’Z’ + XYZ’
In order to implement this function with NOR gates only, we know that it should be
simplified in Product of Sum form. So, for this we take complement on both sides and
get
F’ = (X’Y’Z’ + XYZ’)’
= (X + Y + Z).(X’ + Y’ + Z)
So, two level NOR implementation will give the function F’. If we apply one input (or
two-input) NOR at the third level, we get the original function F as follows:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Prime Implicants:
In choosing adjacent squares in a map, we must ensure that
(i)
(ii)
(iii)
All the minterms of the function are covered when we combine the squares
The number of minterms in the expression is minimized
There are no redundant terms (i.e. minterms already covered by other terms)
A prime Implicant is a product term obtained by combining the maximum possible
number of adjacent squares in the map. If a minterm in a square is covered by only one
prime implicant, that prime implicant is said to be essential.
Note:
 A single 1 on a map represents a prime implicant if it is not adjacent to any other 1’s.
 Two adjacent 1’s form a prime implicant if they are not within a group of four adjacent
squares.
 Four adjacent 1’s form a prime implicant if they are not within a group of eight adjacent
squares and so on.
 The essential prime implicant s are found by looking at each square marked with a 1 and
checking the number of prime implicants that cover it. The prime implicant is essential if
it is the only prime implicant that covers the minterm
Example:
Consider the following Boolean function
F(A, B, C, D) = ∑ (0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)
The K-Map for this function is shown as follows:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
C
AB
CD
00
B’D’
00
01
1
01
11
10
1
1
1
1
1
1
1
1
BD
11
A
10
1
B
1
D
 We shall first of all determine all the essential prime implicants. For this we see
that there is only one way to include minterm m0 within four adjacent squares.
These four squares define the term B’D’. So, it is one of the essential prime
implicants.
 Similarly, there is only one way that minterm m5 can be combined with four
adjacent squares. This gives us the second essential prime implicant BD.
 These two essential prime implicants (i.e. B’D’ and BD) cover eight minterms.
 Now we shall consider the omitted three minterms, i.e. m3, m9 and m11.
 Minterm m3 can be covered with either prime implicant CD or B’C.
 Minterm m9 can be covered with either prime implicant AB’ or AD.
 Minterm m11 can be covered with any one of the four prime implicants.
 So, there are four possible ways that the function can be expressed with four
product terms of two literals each:
F = BD + B’D’ + CD + AD
= BD + B’D’ + CD + AB’
= BD + B’D’ + B’C + AD
= BD + B’D’ + B’C + AB’
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Procedure for Finding Simplified Expression from Map:
1. First determine all the essential prime implicants
2. Then sum all the essential prime implicants plus other prime implicants that may be
needed to cover any remaining minterms not covered by the essential prime
implicants
Don’t Care Conditions:
 In some applications, the function is not specified for certain combinations of the
variables. For example, the four bit binary code for decimal digits (0 to 9) has six
combinations that are not used. So, they are considered to be unspecified.
 Functions that have unspecified outputs for some input combinations are called
“incompletely specified functions”.
 In most applications, we simply don’t care what value is assumed by the function for
the unspecified minterms.. For this reason, these are called “don’t care conditions”.
 In the K-Map, we mark the don’t care conditions with X’s. Thus, an X inside a square
in the map indicates that we don’t care whether the value of 0 or 1 is assigned to F for
the particular minterm.
 While simplifying the function, we can choose to include each don’t care minterm
with either the 1’s or the 0’s, depending upon which combination gives the simplest
expression.
Example:
Simplify the Boolean function
F(W, X, Y, Z) = ∑ (1, 3, 7, 11, 15)
with don’t care conditions
d(W, X, Y, Z) = ∑ (0, 2, 5)
Solution:
The minterms of F are marked by 1’s in the map whereas the minterms of d are the
don’t care conditions that are marked by X’s. The remaining squares are filled by 0’s.
So, the K-Map is as follows:
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
y
w’z
yz
00
01
11
10
X
1
1
X
01
0
X
1
0
11
0
0
1
0
10
0
0
1
0
wx
00
w’x’
z’
x
yz
w
wy’
z
We shall try to combine all the 1’s but we may or may not include any of the X’s. So,
the term YZ covers four minterms in the third column.
The remaining minterm m1 can be combined with minterms m3 , m7 and don’t care
condition m5 to form the product term W’Z. So, the simplified function is as follows:
F = YZ + W’Z
Similarly, minterm m1 can also be combined with minterm m3 and don’t care
conditions m0 and m2 to form the product term W’X’. So, the simplified function is as
follows:
F = YZ + W’X’
In order to get the simplified expression in Product of Sum form, we make groups of
0’s. In this process, in order to make the group as large as we can, we should include
the don’t care conditions (may be already used don’t care conditions which were
combined with 1’s). So, we get
F’ = Z’ + WY’
Taking complement on both sides, we get
F = Z.(W’ + Y)
Which is simplified expression in Product of Sum form.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Exercises:
1. Obtain the simplified expressions in Sum of Product for the following Boolean
functions:
(i)
F(A, B, C, D) = ∑ (7, 13, 14, 15)
(ii) F(A, B, C, D) = ∑ (4, 6, ,7, 15)
(iii) F(A, B, C, D, E) = ∑ (0, 1, 4, 5, 16, 17, 21, 25, 29)
(iv) F = XY + X’Y’Z’ + X’YZ’
(v) F = A’B’C’D’ + AC’D’ + B’CD’ + A’BCD + BC’D
2. Obtain the simplified expressions in Product of Sum for the following Boolean
functions:
(i)
F(X, Y, Z) = Π (0, 3, 5, 6)
(ii) F(A, B, C, D) = Π (0, 1, 2, 3, 4, 10, 11)
(iii) F(W, X, Y, Z) = Π (1, 3, 5, 7, 13, 15)
(iv) F = X’Z’ + Y’Z’ + YZ’ + XYZ
(v) F = (A’ + B’ + D’)(A + B’ + C’)(A’ + B + D’)(B + C’ + D’)
3. Simplify the following functions and implement them with NAND gates only.
(i)
F = AC’ + ACE + ACE’ + A’CD’ + A’D’E’
(ii) F(A, B, C, D) = ∑ (5, 6, 9, 10)
4. Simplify the functions of exercise 3 and implement them with only NOR gates.
CPCS-211 Digital Logic Design
Term
Spring 2012
Lab 5: Simplification of Boolean functions using Karnaugh Maps
Assignment No 3
Due Date: April 10, 2012
Q. No. 1: Using K-Map, obtain the simplified expression in Sum of Products for the
following Boolean functions.
(i) F(x,y,z) = xy + x’y’z’ + x’yz’
(ii) F(x,y,z) = xy’z + xyz’ + x’yz + xyz
Q. No. 2: Using K-Map, obtain the simplified expression in Product of Sum for the
following Boolean functions:
(i)
F(X,Y,Z) = Π (0, 3, 5, 6)
(ii) F(A,B,C,D) = Π (0, 1, 2, 3, 4, 10, 11)
Q. No. 3: Simplify the following Boolean function and implement it with NAND gates only.
F(A,B,C,D) = (B’ + D’)(A’ + C’ + D)(A + B’ + C’ + D)(A’ + B + C’ + D’)
Note: Submit the assignment in proper way with title page. No late submission of
assignment will be entertained.
CPCS-211 Digital Logic Design