Module 0092: Boolean Expression Minimization
Module 0092: Boolean Expression Minimization
Objectives: This module discusses the K-map technique for expression minimization.
2 Notation
In this module, we use the multiple symbol for conjunction and the addition symbol for disjunction. Negation is
represented by a prime symbol. These notation symbols are consistent with the convention used in computer and
electrical engineering.
Furthermore, we use 1 to represent true and 0 to represent false.
3.1 SOP
Sum of products is the more common encoding method. Let us consider an example. Given three terms, X, Y and
Z, we can define a truth table for the output as in table 1.
We can define a product term for each row of the table, yielding table 2.
Note that in table 2, only the rows with an output of 1 are represented by their product terms. This is because
there is no need to represent the rows with 0 as the output. Given the product terms in table 2, we can summarize
and write the equation as follows:
W = X 0 Y 0 Z 0 + X 0 Y Z + XY 0 Z 0 + XY Z 0 + XY Z (1)
X Y Z output
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
1
X Y Z W (output) product
0 0 0 1 X 0Y 0Z 0
0 0 1 0
0 1 0 0
0 1 1 1 X 0Y Z
1 0 0 1 XY 0 Z 0
1 0 1 0
1 1 0 1 XY Z 0
1 1 1 1 XY Z
X Y Z W (output) product
0 0 0 1
0 0 1 0 X 0Y 0Z
0 1 0 0 X 0Y Z 0
0 1 1 1
1 0 0 1
1 0 1 0 XY 0 Z
1 1 0 1
1 1 1 1
3.2 POS
Product of sums is a less common method to encode binary logic. However, it is not much more difficult. Let us
reuse truth table 1. Instead of representing the rows with 1 as the output, now we represent all the rows with an
output of 0.
This yields table 3.
The product terms are intentionally inverted from the output. This yields the following equation:
W = (X 0 Y 0 Z + X 0 Y Z 0 + XY 0 Z)0 (2)
This expression is currently the negation of a sum of products. We can now apply de Morgan’s law, so the
expression becomes the following:
4 Optimization
Let us revisit equation 1. Can we do better than this? Can we simplify the equation, somehow?
A quick visual inspection reveals that we have both the terms XY Z 0 and XY Z in the sum. XY Z 0 + XY Z =
XY (Z 0 + Z) = XY (1) = XY . In other words, we can optimize Z out of the equation, yielding W = X 0 Y 0 Z 0 +
X 0 Y Z + XY 0 Z 0 + XY . Next, we recognize that we have X 0 Y 0 Z 0 + XY 0 Z 0 = Y 0 Z 0 . This further reduces the equation
to W = Y 0 Z 0 + X 0 Y Z + XY .
Can we reduce the equation any further? Is there a systematic method to simply Boolean functions?
2
Z ↓ XY → 00 01 11 10
0 1 1 1
1 1 1
Z ↓ XY → 00 01 11 10
0 1 {d} 1 {a, c} 1 {a, d}
1 1 {b} 1 {b, c}
4.3 Selection
To select the least number of groups (singles, pairs, quads, octs, etc.), we start with the largest size. In our example,
we start with pairs. Since there are four pairs, we need to select the highest number of pairs that leaves the least
number of singles.
Fortunately, we don’t have any singles. This means we only need to select enough pairs to cover all the 1s. In
our case, we have multiple possible combinations of pairs: {a, b, d} and {b, c, d} will both cover all the 1s. It is okay
to have multiple groups covering the same cell.
Selecting pairs {a, b, d} means the output function is W = XZ 0 (a) + Y Z(b) + Y 0 Z 0 (d). Selecting pairs {b, c, d}
means the output function is W = Y Z(b) + XY (c) + Y 0 Z 0 (d).
X Y Z output
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
Table 6: The truth table corresponding to the merge algorithm of module 0079.
3
Z ↓ XY → 00 01 11 10
0 1 1 1
1 1
Z ↓ XY → 00 01 11 10
0 1 {a} 1{a, b, c} 1 {b}
1 1 {c}
In this case, we have to select all the pairs, which means the result is W = X 0 Z 0 (a) + Y Z 0 (b) + X 0 Y (c).
X Y Z output
0 0 0 1
0 0 1 0
0 1 0 ?
0 1 1 1
1 0 0 0
1 0 1 ?
1 1 0 1
1 1 1 0
Table 9: The truth table corresponding to the merge algorithm of module 0079 with “don’t care” entries.
4
Z ↓ XY → 00 01 11 10
0 1 ? 1
1 1 ?