Bolean Algebra & K-MAP
Bolean Algebra & K-MAP
BOOLEAN LAWS
1. Commutative Law
A+B=B+A
A•B=B•A
2. Associative Law
A + B + C = A + (B + C) = (A + B) + C
A • B • C = A • (B • C) = (A • B) • C
3. Distributive Law
A • (B + C) = A • B + A • C
A+(B • C) = (A + B) • (A + C)
De Morgan’s Theorems:
A+ B = A• B
AB = A+ B
KARNAUGH MAP
Another method of simplifying Boolean functions is by using Karnaugh Map or simply
K-map. It is a diagram consisting of a rectangular array of squares, each representing a
different combination of the variables of a Boolean function. This method is usually used for
Boolean functions having two to four variables. Each output of a given truth table
corresponds to one box in the K-map meaning, if the Boolean function has two input
variables, there are 22 or 4 boxes in the Karnaugh map. If there are three variables, K-map
has 23 or 8 boxes and if there are four variables, K-map has 2 4 or 16 boxes. Boxes
containing 1s are grouped according to the following rules:
1. A group must contain 2n adjacent 1s where n = 0, 1, 2, 3 and 4. That is, a group must
contain 1, 2, 4, 8 or 16 1s. One group corresponds to one simplified minterm.
2. A group of adjacent 1s must be in the shape of a square or a rectangle. “L” shape is
not allowed. Rectangular shape can either be horizontal and/or vertical not diagonal.
3. The larger the group, the simpler the reduced expression will be. Meaning, look first
for a group of 16 1s, then a group of 8 1s, then a group of 4 1s, then a group of two
1s, then finally a single 1, until all 1s have been grouped. “1” can be a member of two
or more groups.
4. Finally, write the simplified expression by adding the minterms of every group.
Below are examples of a two input, three input and four input variable K-map. Take
note of the specific arrangements where the outputs of mintermsm0 to m15 are to be
placed.
B
A
0 1
0 m0 m1
1 m2 m3
BC
A 00 01 11 10
0 m0 m1 m3 m2
1 m4 m5 m7 m6
CD
AB 00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
m1 m1 m1 m1
11
2 3 5 4
m1 m1
10 m8 m9
1 0
BC
11
A 00 01 11 10
0 0 0 0
1 1 1 0
Q= A B+ BC
BC
A
1
00 01 11 10
0 0 1 0 Q=C
1 0 1 1 0
YZ
11
X 00 01 11 10
0 0 0 0 Q= X Y + Y Z
1 1 0 0
One important characteristic of K-map is that the top, bottom, left and right can be
rolled so that the four corners will meet each other and will form a group if applicable. This
characteristic is illustrated in the following discussion. Suppose we are going to derive the
simplified Boolean expression of the given truth table below.
A B C D F
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
Solution:
Draw first the K-map and write the outputs. Then, the four 1s at the corners can be
grouped as one when they are rolled as shown.
CD
AB
00 01 11 10
00
1 0 0 1
01 0 0 0 0
11 0 0 0 0
10
0 0
1 1
There are instances wherein the outputs of some input combinations are not defined.
These outputs are called don’t care outputs and are usually denoted by “x”. In using K-map
these outputs can be considered as 1 or 0, whichever results in a more simplified
expression.
Consider the truth table shown below and obtain a simplified Boolean expression.
A B C D F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 x
1 1 0 1 x
1 1 1 0 x
1 1 1 1 x
The K-map and the groupings should be,
CD
AB 00 01 11 10
00 0 0 0 0
01 0 0 1 1
11 X X X1 X
10 1 1 0 0
so, F= A C+ BC
Exercises:
Obtain the simplified Boolean function of the following k-map. Use F as the output.
CD
1)
AB 00 01 11 10
00 0 1 0 0
01 0 1 1 1
11 1 1 1 0
10 0 0 1 0
ANSWER:
F= AB Ć + Á Ć D+ Á BC + ACD
CD
2) AB 00 01 11 10
00 1 0 0 1
01 1 0 0 1
11 1 0 0 1
10 1 0 0 1
ANSWER:
F= D́
3)
CD
AB
00 01 11 10
00 1 1 0 0
01 0 1 1 0
11 0 0 0 0
10 1 0 x 1
ANSWER:
F= Á B́ Ć + Á BD + A B́ D́
CD
AB
4) 00 01 11 10
00 1 x 1 x
01 1 0 0 1
11 0 0 0 0
10 0 X 0 0
ANSWER:
F= Á B́+ Á D́
EXERCISES:
Obtain a simplified Boolean expression from the given truth table below using the following
methods:
1. By applying Boolean rules
2. By using Karnaugh map
A B C D F
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0