Karnaugh Maps 1 15
-
Upload
mohammed-nawaz-shaik -
Category
Documents
-
view
221 -
download
0
Transcript of Karnaugh Maps 1 15
-
8/13/2019 Karnaugh Maps 1 15
1/15
Karnaugh Maps / K-maps by ANSHAY AGARWAL
Before going through the Karnaugh maps, some terms need to beclarified. These are as follows
Literals
A literal is a single logic variable or its complement.
For example X, Y, A, Z, X, etc.
Minterms
A minterm is the product of all the literals with or without
complement involved in a logic system.
For example
AB, AB, AB, AB (for a problem containing only A and B),
ABC, ABC, ABC (for a problem containing A, B and C)
When the values of different variables are given, minterms can
be easily formed as-
If X=0, Y=0 minterm would be XY
If X=1, Y=0, Z=1 minterm would be XYZ
So, use the variable with value 1 as it is and variable with value 0
as complemented to find the minterm.
-
8/13/2019 Karnaugh Maps 1 15
2/15
Maxterm
A maxterm is the sum of all the literals with or without
complement involved in a logic system.
For example
A+B, A+B, A+B, A+B (for problem containing only A and B)
A+B+C, A+B+C, (for problem containing A, B and C)
When the values of different variables are given, maxterms can
be easily formed as-
If X=0, Y=0 maxterm would be X+YIf X=1, Y=0, Z=1 maxterm would be X+Y+Z
So use the variable with value 1 as complemented and variable
with value 0 as it is to find the maxterm.
Canonical expressions
A Boolean expression containing entirely of minterms or
maxterms is known as canonical expression. These are of two
types
o Sum Of Product(SOP form)
It is the sum of all the minterms that result in a true value
of the output variable.
For example
XY+XY+XYXYZ+XYZ+XYZ+XYZ
AB+AB
-
8/13/2019 Karnaugh Maps 1 15
3/15
-
8/13/2019 Karnaugh Maps 1 15
4/15
o For maxterm
To represent a maxterm as shorthand notation following steps are
to be followed-
3. Write 1 for a complemented term and 0 for non-complemented
term. This will give you a binary number.
4. The shorthand notation will be a capital M with the decimal
equivalent of the binary number as subscript of M.
Eg. The minterm X+Y is represented as-
01
M1
X+Y+Zwill be represented as
X+Y+Z --> 010
So M2
Minterm expansion of an expression
Any expression can be represented using minterms. To find the
minterm expansion of an expression following steps have to be
followed-
1. Write down all the terms in the expression
2. Put X where ever a literal is missing to convert the terms to
minterms
3. Use all the combinations of Xs to find minterms
4. Remove the duplicate/repeated terms and write the terms
together.
-
8/13/2019 Karnaugh Maps 1 15
5/15
Lets consider an example
Write AB+C using minterms onlyFollow the above steps as-
1. AB , C
2. ABX , XXC
3. ABX ABC, ABC
XXC ABC, ABC, ABC, ABC4. ABC+ABC+ABC+ABC+ABC-----------------answer
Write AB+AC using minterms
Follow the steps as-
1. AB, AC
2. ABX, AXC
3. ABX ABC, ABCAXC ABC, ABC
4. ABC+ABC+ABC -----------------------------answer
Exercise: write the expressions using minterms-
1) A+B
2) ABC+AD
3) AC+BD
-
8/13/2019 Karnaugh Maps 1 15
6/15
Revisiting SOP and POS forms
Till now we have studied what the SOP and POS forms are. Now we willsee how to expand a given function in the SOP or POS form.
Lets consider a three input valued function F such that F is 1 if
number of 1 inputs is odd and 0 otherwise.
SOP formFirst make the truth table for the function.
One special thing that we will do here is to write the minterms also in a
separate column
A B C F MINTERMS
0 0 0 0 ABC
0 0 1 1 ABC
0 1 0 1 ABC
0 1 1 0 ABC
1 0 0 1 ABC
1 0 1 0 ABC
1 1 0 0 ABC
1 1 1 1 ABC
The SOP form of F is given by the sum of those minterms for which
value of F is 1.
F = ABC+ ABC+ ABC+ ABC
See how simple it is!
-
8/13/2019 Karnaugh Maps 1 15
7/15
Example:
-----------Find SOP form of the function F = (0, 1, 3, 6, 7)
(A function can also be represented in the above form. Here the
numbers represent the subscript of the shorthand notation ofminterms for which function has a TRUE value.)
A B C F MINTERMS
0 0 0 1 ABC
0 0 1 1 ABC
0 1 0 0 ABC
0 1 1 1 ABC
1 0 0 0 ABC1 0 1 0 ABC
1 1 0 1 ABC
1 1 1 1 ABC
The SOP form isF = ABC + ABC + ABC + ABC + ABC
-----------Find SOP form of the function F = AB + BC
Draw the truth table
A B C F MINTERMS
0 0 0 0 ABC
0 0 1 0 ABC
0 1 0 0 ABC
0 1 1 1 ABC
1 0 0 0 ABC
1 0 1 0 ABC1 1 0 1 ABC
1 1 1 1 ABC
-
8/13/2019 Karnaugh Maps 1 15
8/15
SOP form is-- F = ABC + ABC + ABC
POS formMake the truth table
Write the Maxterms in a separate column
A B C F MAXTERMS
0 0 0 0 A+B+C
0 0 1 1 A+B+C
0 1 0 1 A+B+C
0 1 1 0 A+B+C
1 0 0 1 A+B+C
1 0 1 0 A+B+C1 1 0 0 A+B+C
1 1 1 1 A+B+C
The POS form of F is given by the product of those maxterms for
which value of F is 0.
F = (A+B+C)(A+B+C)(A+B+C)(A+B+C)
Example:
-----------Find POS form of the function F = (2, 4, 5)
(A function can also be represented in the above form. Here the
numbers represent the subscript of the shorthand notation of
maxterms for which function has a FALSE value.
-
8/13/2019 Karnaugh Maps 1 15
9/15
is used for maxterms and is used for minterms)
A B C F MAXTERMS
0 0 0 1 A+B+C
0 0 1 1 A+B+C
0 1 0 0 A+B+C
0 1 1 1 A+B+C
1 0 0 0 A+B+C
1 0 1 0 A+B+C
1 1 0 1 A+B+C
1 1 1 1 A+B+C
The POS form isF = (A+B+C)(A+B+C)(A+B+C)
-----------Find POS form of the function F = AB + BC
Draw the truth tableA B C F MAXTERMS
0 0 0 0 A+B+C
0 0 1 0 A+B+C0 1 0 0 A+B+C
0 1 1 1 A+B+C
1 0 0 0 A+B+C
1 0 1 0 A+B+C
1 1 0 1 A+B+C
1 1 1 1 A+B+C
The POS form is--F = (A+B+C) (A+B+C) (A+B+C) (A+B+C) (A+B+C)
Exercise:
Find SOP and POS forms of
-
8/13/2019 Karnaugh Maps 1 15
10/15
F= (0, 1, 3, 6, 9, 10, 14)
F= (1, 4, 5, 7, 12, 13, 15)
F= AB + BC + ABD
Minimization of Boolean expressionsThere are two ways to minimize a Boolean expression-
1) Algebraic method
2) Karnaugh maps
Algebraic methodIn this method the Boolean expression is reduced by using the
theorems of Boolean algebra. For example
-------simplify the function F = ABC + ABC + ABC
F = AB.(C+C) + ABC (X+X=1)
= AB . 1 + ABC= AB + ABC
= A.(B+BC) (absorption law)
= A.(B + C)
= AB + AC
-------simplify the function F= ABCD + ABCD + ABCD + ABCD
F = ABC.(D+D) + ABC.(D+D)
= ABC + ABC
-
8/13/2019 Karnaugh Maps 1 15
11/15
= AC.(B+B)
= AC
Karnaugh MapsKarnaugh maps also known as K-maps make the simplification of the
expressions very easy. A K-map consists of 2ncells, where n is the
number of variables in the expression which is to be reduced.
The reduction of SOP and POS forms using K-maps is shown as
follows
SOP reduction using K-maps
Each cell of the K-map represents a minterm. A K-map for two
variables is shown below
X XX
Y [0] [1]
Y
Y
The number of
cells is 4 since number
of variables is
2. The 2 variables are
X and Y written with the line. The 0 and 1 written in the square
[0]
0 1
[1]
[0]
2 3
-
8/13/2019 Karnaugh Maps 1 15
12/15
brackets are the possible values of X and Y. Each cell is a combination
of the value of that row and column and the number on the top-right
corner of the cell represents the decimal value of that combination.
For example- the first cell has a combination [0][0] whose decimal
equivalent is 0. Also cell number 2 has a combination [0][1] and decimal
value is 1, so the value on the top-right corner of cell 2 is 1.
K-map for 3 variables is as shown
YZ YZ YZ YZ
YZ
X [00] [01] [11] [10]
X [0]
0 1 3 2
X [1][0] ]
4 5 7 6
These are combinations for YZ
The combinations are such that only one variable changes its value in
adjacent columns.
The content of a cell is determined by the value of expression for the
value of input corresponding to the values of that row and column.
-
8/13/2019 Karnaugh Maps 1 15
13/15
For example if the value of expression for the input 001 is 1 then the
second cell(that is cell with row value [0] and column value [01]) will be
filled with 1.
Example: let the truth table of an expression is-
X Y Z F
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 11 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
So the K-map would be-
YZ
X YZYZYZ YZ
[00] [01] [11] [10]
X [0]
0 1 3 2
1 1 1 0
X [1][0] ]
4 5 7 6
0 0 1 1
-
8/13/2019 Karnaugh Maps 1 15
14/15
See how the K-map is filled for the values of F from truth table.
K-map for 4 variables
CDAB
CD CD CDCD
[10][11]
0]
[01][00]
B [00]
0 1 3 2
1 0 1 1
B [01]
4 5 7 6
1 0 1 1
B [11]
12 13 15 14
1 1 1 1
B [10]
8 9 11 10
1 1 1 1
Reduction from a K-map
Pair
A combination of two ones is called a pair. In above figure, a pair is
shown with yellow background. A pair is reduced by writing all the
variables except for those which change from complemented to un-
complemented or vice versa.
For example-
In the above map, the variable B changes from B to B.
-
8/13/2019 Karnaugh Maps 1 15
15/15
So, the reduced value of the pair is ACD.
A pair removes only one variable.
Quad
A combination of four ones is called a quad. In above figure, a quad is
shown with green background. A quad is also reduced by writing all the
variables except for those which change from complemented to un-
complemented or vice versa.
For example- in the above map, the variable B changes from B to B
and D changes from D to D.
So, the reduced value of the quad is AC since A and C do not change
values for the four cells.
A quad removes two variables.
Octet
A combination of 8 ones is called an octet. In above figure, an octet is
shown with red background. An octet is also reduced by writing all the
variables except for those which change from complemented to un-
complemented or vice versa.
For example- in the above map, the variables B, C, and D change but A
does not change.So, the reduced value of the octet is A.
An octet removes three variables.