Unit 8 - Karnaugh Mapping
Unit 8 - Karnaugh Mapping
Unit 8 - Karnaugh Mapping
Input
A
0
0
1
1
Input
B
0
1
0
1
B (0)
(1)
(0) A
m0
m1
(1) A
m2
m3
Minterms
m0= A.B
m1= A.B
m2= A.B
m3= A.B
00
m0
m1
01
m2
m3
11
m6
m7
10
m4
m5
AB
Minterms
AB
m0= A.B.C .D
m1= A.B.C .D
m2= A.B.C .D
m3= A.B.C .D
m4= A.B.C .D
m5= A.B.C.D
m6= A.B.C.D
m7= A.B.C.D
m8= A.B.C.D
m9= A.B.C.D
m10= A.B.C.D
m11= A.B.C.D
m12= A.B.C.D
m13= A.B.C.D
m14= A.B.C.D
m15= A.B.C.D
CD
00
01
11
10
00
m0
m1
m3
m2
01
m4
m5
m7
m6
11
m12
m13
m15
m14
10
m8
m9
m11
m10
The cells in the Karnaugh map are arranged so that there is only a single variable change
between the minterms in adjacent cells.
For example, for a four variable function (with inputs A, B, C and D), m 0 and m1 are adjacent.
This is because the only change between A.B.C.D and A.B.C.D is D replaced by D.
In a similar fashion, m5 and m13 are adjacent A.B.C.D and A.B.C.D . Note that m12 and
m14 are also adjacent A.B.C.D and A.B.C.D .
It can be concluded that each cell in a Karnaugh map is adjacent to cells that are immediately
next to it on any of its four sides. Cells on the top row are adjacent to the corresponding cells
on the bottom row and cells in the left-most column are adjacent to the corresponding cells on
the right-most column (This is called wrap-around). However a cell is not adjacent to the
cells that diagonally touch any of its corners.
Once a Boolean expression is in the SOP form it can be plotted by placing 1s in the cells
corresponding to the minterms that make up the function.
Now draw a Karnaugh Map for the Boolean Functions of Ex. 1 to Ex. 5.
Ex 5: Minimise the following function using Karnaugh Mapping. Verify your result using
Boolean Algebra.
Karnaugh Map
Truth Table
Input Input Input Input Minterms
A
B
C
D
0
0
0
0
m0
0
0
0
1
m1
0
0
1
0
m2
0
0
1
1
m3
0
1
0
0
m4
0
1
0
1
m5
0
1
1
0
m6
0
1
1
1
m7
1
0
0
0
m8
1
0
0
1
m9
1
0
1
0
m10
1
0
1
1
m11
1
1
0
0
m12
1
1
0
1
m13
1
1
1
0
m14
1
1
1
1
m15
Output
F
0
0
0
0
0
0
1
0
1
0
1
0
1
0
1
0
AB
CD
00
01
11
10
00
01
11
10
B.C.D
A.D
F A.D B.C.D
Now say that this function had some dont care states denoted by X. The resulting Boolean
function can be minimised further.
Karnaugh Map
Truth Table
Input Input Input Input Minterms
A
B
C
D
0
0
0
0
m0
0
0
0
1
m1
0
0
1
0
m2
0
0
1
1
m3
0
1
0
0
m4
0
1
0
1
m5
0
1
1
0
m6
0
1
1
1
m7
1
0
0
0
m8
1
0
0
1
m9
1
0
1
0
m10
1
0
1
1
m11
1
1
0
0
m12
1
1
0
1
m13
1
1
1
0
m14
1
1
1
1
m15
Output
F
X
0
X
0
X
0
1
0
1
0
1
0
1
0
1
0
AB
CD
00
01
11
10
00
01
11
10
It can be seen that the output function has been reduced to contain just one variable. The
output function is
F D
Further Exercises
Minimise the following Boolean expressions using Karnaugh Mapping:
Ex. 7:
Ex. 8:
Ex. 9:
Ex. 10:
A.B.C .D
A.B.C .D, A.B.C .D, A.B.C .D, A.B.C .D, A.B.C .D and A.B.C .D.
Ex. 12:
Ex. 13: The function of Ex. 12, in which minterms m10 to m15 are not allowed.
Ex. 14:
Ex. 21:
Ex. 22: F C .
Ex. 23:
F A.( B D C BD ) CB ( AD. A D )
This may also be verified using a truth table. When both inputs are the same, that is A=B,
then the 01 and 10 conditions dont exist.
INPUT A
0
0
1
1
INPUT B
0
1
0
1
A.B
1
1
1
0
A.B
A.B
A B
B
A.B
B
A B
B
A.B
B
A B
This may also be verified using a truth table. When both inputs are the same, that is A=B,
then the 01 and 10 conditions dont exist.
INPUT A
0
0
1
1
INPUT B
0
1
0
1
A B
1
0
0
0
A B
A B A B (Rule 9)
A B
A B
A.B
B
A.B
B
A B
B
A B
10
using
B
C
D
A
F A.B C .D A.C
A B C D AC
11
C
F
Alternatively, the logic diagram for the minimised function can be built using AND, OR and
NOT gates and the NAND (or NOR) equivalents of each gate can be substituted. Removal of
superfluous inverter pairs will result in the same circuits as obtained above. However, the
gate substitution method takes significantly longer to implement.
Further Exercises
Ex. 27: Minimise the following Boolean Expression using Boolean algebra:
F C.
Implement in the minimised form (a) using NAND gates only; and (b) using NOR gates only.
Ex. 28: Minimise the following Boolean Expression using Boolean algebra:
F B.( A.C . A.D.C . A.D.C ) ( A B C D )
Implement in the minimised form (a) using NAND gates only; and (b) using NOR gates only.
Ex. 29: Minimise the following Boolean Expression using Boolean algebra:
Implement in the minimised form (a) using NAND gates only; and (b) using NOR gates only.
12