Chapter-3 2
Chapter-3 2
part two
Boolean algebra and logic simplification
Standard and Canonical Forms
• All Boolean expressions, regardless of their form, can be converted into either of two
standard forms:
• The sum-of-products form or
• The product–of–sum forms
Minterm representation
Minterms are the shorthand notations used to express the product terms in SOP form.
That is, each individual term in the SOP form is called a minterm.
For a Boolean function having n variables, there will be 2n minterms.
For example, a Boolean function with 3 variables will have 23 = 8 minterms and a Boolean
function with 4 variables will have 24 = 16 minterms.
The following table shows the minterms for 3 variable Boolean function.
The canonical SOP expression F = ABC + A’B’C + ABC’ + A’BC +A’BC’ can be written
as follows in terms of minterm notation.
F = m7 +m1 + m6 + m3 + m2
This implies that the given Boolean function is logically true for the minterms (m7, m1,
m6, m3, m2).
Below are the steps to convert non-canonical SOP to Canonical or standard SOP.
Convert the given expression F(A, B, C) = A + B’C into canonical SOP form.
In the given expression, literal B and C are missing in the 1st product term. So (B+B’) and
(C+C’) are multiplied with the term A. Similarly, literal A is missing in the 2nd product
term. So (A+A’) is multiplied with the product term B’C.
Thus we have obtained the canonical SOP or standard SOP form.
Product of Sum form is a group of Sum(OR) terms that are Multiplied(ANDed) together. Here
also, the product and sum are not mathematical operations but are binary operations. The POS
expression may consists of two or more sum(OR) terms, all of which are ANDed together. The
POS form is also called as Conjunctive normal form.
If each term in the POS form contains all the literals in either complemented or uncomplemented
form, then the POS is referred to as Canonical or standard POS form, where each individual term is
called maxterm.
In the above example, (A+B+C), (A’+B’+C), (A+B+C’), (A’+B+C) and (A’+B+C’) are the five
maxterms, where each term has all the literals in the Boolean function either in complemented or
uncomplemented form. So, it is said to be a standard or canonical POS form.
Maxterm representation
Maxterm representation is similar to the minterm representation but here it is used to express the
sum terms in POS form. That is, each individual term in POS form is called maxterm. For a
Boolean function having n variables, there will be 2n maxterms.
For example, a Boolean function with 3 variables will have 23 = 8 maxterms and a Boolean unction
with 4 variables will have 24 = 16 maxterms.
The following table shows the maxterms for 3 variable Boolean function.
The canonical POS expression F = (A+B+C) . (A’+B’+C) . (A+B+C’) . (A’+B+C) .
(A’+B+C’) can be written as follows in terms of maxterm notation.
F = M0 +M6 + M1 + M4 + M5
This implies that the given Boolean function is logically true for the maxterms (M0, M6,
M1, M4, M5).
The non-canonical or normal POS form is a simplified version of standard or canonical POS form.
The normal form is obtained by doing simplification to the standard form. Consider the above
equation and see how it is simplified to get the non-canonical POS form.
The obtained expression is in POS form but literal C is missing in 1st and 2nd terms. Hence, it is a
non-canonical POS form.
Below are the steps to convert non-canonical POS to Canonical or standard POS.
Convert the given expression F(A, B, C) = (A+B)(B+C) into canonical POS form.
In the given expression, literal C is missing in the 1st sum term. So (C.C’) is added with
the term (A+B). Similarly, literal A is missing in the 2nd sum term. So (A.A’) is added
with the term (B+C).
Thus, we have obtained the canonical POS or standard POS form.
Canonical SOP can be converted into canonical POS form and the vice versa can be done in a
simple way. To better understand, let us consider the SOP expression F = ABC + A’B’C + ABC’
+ A’BC +A’BC’.
Now to convert it into canonical POS expression, follow the steps below.
The minterms and maxterms have a complementary relationship for a given Boolean expression.
So, write the expression in terms of maxterm for the remaining terms in the above minterm
expression.
We get, F = M0 + M4 + M5
Thus, the canonical POS expression is, F = (A+B+C) . (A’+B+C) . (A’+B+C’) Let
Consider the POS expression in terms of maxterm. F = Π M(1, 3, 5, 7, 9, 11, 12, 13).
The SOP expression is given by, F = ∑ m(0, 2, 4, 6, 8, 10, 14, 15)
The K map contains boxes called cells. Each cell represents one of the 2n possible terms (either
product term or sum term) that can be formed from the variables. For example, for a 2-variable
map, there will be 22 = 4 cells, for a 3-variable map, there will be 23 = 8 cells, and so on.
For labeling, when we move from one cell to the next cell along any row or column, only
one variable changes to either a complemented form or to an uncomplemented form.
The product terms or sum terms are assigned to each cell corresponding to the product or sum of
rows and columns of the particular cell. Each cell is numbered from 0 to 7 for an 8 cell K map.
While doing so, cells in the first row are numbered as 0, 1, 3, and 2(the number order 2 and 3 are
reversed as the labeling follows the sequence 00, 01, 11, and 10). The cells in the second row are
numbered as 4, 5, 7, and 6. For a clear understanding, look at the picture below.
Instead of writing the actual product terms in SOP form, the corresponding minterm
notations can be written in the cell. Similarly, instead of labeling the rows and columns
with the variable and its complement, they are marked with gray codes.
In the same way, K maps can be used for simplification of the product of sum(POS) form. Instead
of writing the actual sum terms in POS form, the corresponding maxterm notations can be written
in the cell.
Plotting a Karnaugh Map
A logic function either in a truth table format, SOP expression or POS expression format can be
easily plotted in karnaugh maps. Each K-map is nothing but the extended version of truth tables,
in which the K map representation follows a different approach.
Let us look at the procedure to plot. Here the plotting of 4 cells K-map and 8 cells K-map is shown
for your understanding purpose.
In the above figure, a logic function in a truth table form is considered, which has two inputs (A
and B) and one output(Y). The output produced was true (logic 1) for two input combinations (01,
11) and false (logic 0) for two input combinations (00, 10).
The logic ‘1’ output for an input value AB = ’01’ is plotted to the K-map corresponding to a cell,
which has A=’0′, B=’1′ in the label. The logic ‘1’ output for an input value AB = ’11’ i plotted to
the K-map corresponding to a cell, which has A=’1′, B=’1′ in the label.
The logic ‘0’ output for an input value AB = ’00’ is plotted to the K-map corresponding to a cell,
which has A=’0′, B=’0′ in the label. The logic ‘0’ output for an input value AB = ’10’ is plotted to
the K-map corresponding to a cell, which has A=’1′, and B=’0′ in the label.
In a similar way, a logic function with three inputs and one output can be plotted in an 8 cell Kmap
and a logic function with four inputs ad one output can be plotted in a 16- cell K-map. For your
understanding purpose, the plotting of 8 cells K-map is shown below.
Plotting SOP expression in a K-map
A Boolean SOP expression can also be plotted in a K-map by simply placing a logic 1 in the cell
corresponding to a minterm of that expression. The remaining cells are filled with logic 0. Let us
look at some examples.
Example Problem 1
Let us plot a Boolean expression Y = A’B’C + ABC’ + A’BC’ + AB’C in a Karnaugh map.
The given expression has three variables A, B and C. Hence 23 = 8 cell K-map is used for plotting
the expression.
As you see, the above plotting is done by labeling the K-map with the variable name (A, B,
and C) and its complement. This plotting can be done by replacing the variable and its
complement with logic 0 and 1 as shown below.
Example Problem 2
Plot a Boolean expression Y = A’B’CD + A’BCD + AB’CD + ABC’D + ABCD in a Karnaugh map.
The given expression has four variables A, B, C and C. Hence 24 = 16 cell K-map is used for
plotting the expression.
Plotting POS expression in a K-map
A Boolean POS expression can also be plotted in a K-map by simply placing a logic 0 in the cell
corresponding to a Maxterm of that expression. The remaining cells are filled with logic 1. Let us
look at some examples.
Example Problem 3
The given expression has four variables A, B, C and D. Hence 24 = 16 cell K-map is used for
plotting the POS expression.
After plotting the term in the Karnaugh maps, we have to simplify it. For simplification, we go for
the grouping of adjacent cells.
Grouping is nothing but combining the neighbor cells that have common boolean variables to get
a simplified expression. Two cells are said to be adjacent if there is only one difference between
the coordinates of two cells.
The adjacent cells can be either neighboring cells in a row or neighboring cells in a column. Also,
the leftmost columns can be grouped with the rightmost column and the topmost row with the
bottommost row, which is depicted as follows.
The cells in the K-map cannot be grouped in some ways, which is said to be illegal grouping.
The following image shows the different illegal groupings of cells.
Now, let us discuss the various grouping rules.
Grouping two adjacent cells (Pair)
Look at the following example. As you see, the K-map contains 3 pairs of 1s, which are vertically
adjacent and horizontally adjacent to each other.
The two adjacent 1s are located at the cells with the terms A’B’C’D’ and AB’C’D’, A’BC’D and
A’BCD, A’BCD’ and ABCD’. The three individual pairs of cells can be combined.
In the first pair(A’B’C’D’ and AB’C’D’), in which the input variable A appears in normal and its
complement form, whereas B’C’D’ remains unchanged.
Whereas in the second pair(A’BC’D and A’BCD), in which the variable C appears in normal and
its complement form, whereas A’BD remains unchanged.
In the third pair(A’BCD’ and ABCD’), in which the variable A appears in normal and its
complement form, whereas BCD’ remains unchanged. Thus by combining the three pairs of cells,
we get B’C’D’ + A’BD + BCD’ as result. Thus by grouping the adjacent cells, a simplified
expression can be obtained.
Four neighboring cells can be grouped, which is called quad grouping. Grouping four cells can be
done in different ways. Look at some of the examples below.
Eight neighboring cells can be grouped, which is called octet grouping. The octet grouping gives
a simplified boolean equation. Grouping eight cells can be done in different ways. Look at some
of the examples below.
Minimization of Boolean function using k-map
The Karnaugh map or K-map is used for minimization or simplification of Boolean function either
in Sum of Product(SOP) form or in Product of Sum(POS) form.
1. Select the size of the K-map, based on the number of variables present in the Boolean
function.
2. Plot the K-map.
3. Check the K-map for isolated 1s, which are not adjacent to any other 1s and encircle those
isolated 1s.
4. Check the K-map for pair of 1s, which are adjacent to only one other 1s and group it.
5. Check the K-map for quads and octets and group them, even if contain any 1s, that have
been already encircled. But be sure to form minimum number of groups.
6. Form the expression from the groups that have been encircled by summing them.
Example Problem 1
Let us minimize the expression Y = AB’C + A’B’C + A’BC + AB’C’ + A’B’C’ Solution:
Step 1: The given function has three variables and hence 23 = 8 cells K-map is necessary to
minimize the expression.
Example Problem 2
Let us minimize the boolean expression Y = ABC’D + ABC’D’ + ABCD + A’BCD + ABCD’ +
A’BCD’.
Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary
to minimize the expression.
Step 4: Group the pair of 1s in the K-map. But here, two quad groups can be formed. [Thus the number of
groups are minimized by grouping the quad cells instead of pairing two cells].
Step 5: There is no octet group.
Example Problem 3
Simplify the boolean expression Y(A, B, C, D) = ∑ m (0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 14) Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary
to minimize the expression.
Hence, from the K-map, the simplified output expression is Y = B’ + C’D’ + AD’ +
A’CD
1. Select the size of the K-map, based on the number of variables present in the Boolean
function.
2. Plot the K-map by placing 0s for the given Maxterms and place 1s for the remaining cells.
3. Check the K-map for isolated 0s, which are not adjacent to any other 0s and encircle those
isolated 0s.
4. Check the K-map for pair of 0s, which are adjacent to only one other 0s and group it.
5. Check the K-map for quads and octets and group them, even if contain any 0s, that have
been already encircled. But be sure to form minimum number of groups.
6. Form the expression from the groups that have been encircled by summing them.
Example problem 4
Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary to
minimize the expression.
Hence, from the K-map, the simplified output expression is Y = (B’+C+D) (B+C+D’)
(A+B+C’)
Example problem 5
Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary to
minimize the expression.
Step 4: Group the pair and quad of 0s in the K-map. There is no octet group of 0s here.
Hence, from the K-map, the simplified output expression is Y = (A’+B+C) (A’+D’)
(A+B+C’)
Don’t care conditions in K-map
In logic circuit design, there may be a situation, where certain input and output conditions can
never occur. In that case, the output can be either 0 or 1, that is, the output cannot be defined for
such inputs and so they are indicated as ‘x’, which represents don’t care output.
In the above truth table, we can observe that, the output is seen for the inputs from 000 to 100.
For remaining three inputs(101, 110, 111), the output is not defined and hence called as don’t care
conditions, denoted as x.
These don’t care outputs are indicated in the boolean expression using a letter d in the function.,
where d indicates don’t care condition.
For the above truth table, the Boolean function can be written as
From the boolean function, it is observed that, the logic is true for minterms 1, 2, 4 and the output
is not defined for minterms 5, 6, 7. Similarly the Boolean function in terms of maxterm can be
written as
Using K-map, the boolean function with don’t care condition can be minimized by considering
either 0 or 1 for don’t care outputs, depending on the minterms to get the simplest expression.
In the above K-map example, minterms 4 and 5 are don’t care outputs and hence denoted as x. To
minimize this boolean expression to the simplest one, we are considering the minterm 5 as logic 1
and the minterm 4 as logic 0. Since the minterm 5 is considered as logic 1, it forms a quad group
with minterms 1, 3 an 7. Thus we get a simplified expression Y = C as output.
From this, we can observe that, it is important to decide, which don’t care output is to be changed
to 1 and which is to be changed to 0, so that best grouping is produced.
Let us have a look at some example problems here or your better understanding.
Example Problem 6
Simplify the boolean function with don’t care conditions Y(A, B, C, D) = ∑ m (1, 3, 7, 11, 15) + d
(0, 2, 5).
Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary to
minimize the expression.
Step 3: Here, instead of pairing cells, quad group can be formed. To form a quad group of 1s, the
don’t care outputs of cells 0, 2 are replaced by 1s and grouping is done. The remaining don’t care
outputs are left alone or replaced by 0s.
Hence, from the K-map, the simplified output expression is Y = A’B’ + CD
Example Problem 7
Simplify the boolean function with don’t care conditions Y(A, B, C, D) = Π M (4, 5, 6, 7, 8, 12) +
d (1, 2, 3, 9, 11, 14).
Solution:
Step 1: The given function has four variables and hence 24 = 16 cells K-map is necessary to
minimize the expression.
Hence, from the K-map, the simplified output expression is Y = (A+B’) (A’+C+D)