Chapter 3 Min
Chapter 3 Min
SIMPLIFICATION OF BOOLEAN
EXPRESSIONS AND COMBINATIONAL
LOGIC CIRCUIT DESIGN
Introduction
B x
PSfrag replacements
C
28
page 32 of 101
29
= AB A(B + C)
= AB AB + AC
= ABAB + ABAC
= ABC
This canPSfrag
be implemented using only two gates, as shown on Figure 3.2.
replacements
A
B x
C
To use this method, you need to know the theorems of Boolean algebra very well -
you will need a lot of practice to improve your skills. There are generally two steps
when using this method:
i) Put the expression in Sum of Products form (not Standard Sum of Products
form). This may require the use of De Morgan’s theorem or the distributive
rules.
ii) Check for common factors and factor out whenever possible. Factoring usually
results in the elimination of some of the terms.
page 33 of 101
30
Example
Simplify algebraically:
ABC + AB C̄ + AB̄C
The expression is already in sum of products form, so we shall just factor out the
expression:
ABC + AB C̄ + AB̄C = AB C + C̄ + AB̄C
= AB + AB̄C = A B + B̄C
= A (B + C) = AB + AC
Example
Simplify algebraically:
x = ABC + AB ĀC̄
This expression is not in sum of products form, so we shall first apply De Morgan’s
Theorems to get:
x = ABC + A + B A + C
= ABC + A + B (A + C)
= ABC + AC + AB + BC
Now the expression is in sum of products form, so we can proceed with the simplifi-
cation:
x = C A + AB + AB + BC
= C A + B + AB + BC
= AC + BC + BC + AB
= AC + B + B C + AB
= AC + C + AB
= C + AB
Example
A student may register for course X only if he satisfies the following conditions:
(1) Has completed at least 20 courses AND is an engineering student AND of good
conduct, OR
(2) Has completed at least 20 courses AND is an engineering student AND has
departmental approval, OR
(3) Has completed fewer than 20 courses AND is an engineering student AND not
of good conduct, OR
page 34 of 101
31
B: Is an engineering student
C: Is of good conduct
BD + CD = BD + CD + BC
Hence:
Y = AB + BC + BD + CD + BC
= AB + B C + C + BD + CD
= AB + B + BD + CD
= B + BD + CD
= B + CD
Hence a student may register for the course X if he is an engineering student OR he
is of good conduct AND has departmental approval.
page 35 of 101
32
Introduction
A A
B 0 1 B 0 1
0 m0 m2 0 1 0
1 m1 m3 1 1 0
The K-map may be alternatively drawn with the variable A on the vertical side and
variable B on the horizontal side, as shown on Figure 3.4:
3-variable K-map
page 36 of 101
PSfrag replacements
33
B B
A 0 1 A 0 1
0 m0 m1 0 1 1
PSfrag replacements 1 m2 m3 1 0 0
A B C x minterm
0 0 0 1 m0
0 0 1 1 m1
0 1 0 1 m2
0 1 1 0 m3
1 0 0 0 m4
1 0 1 0 m5
1 1 0 1 m6
1 1 1 0 m7
AB AB
C 00 01 11 10 C 00 01 11 10
0 m0 m2 m6 m4 0 1 1 1 0
PSfrag replacements
1 m1 m3 m7 m5 1 1 0 0 0
Note that the K-map cells are labelled in such a way that adjacent cells differ only in
one variable.
The 3-variable K-map may be alternatively drawn as shown on Figure 3.6.
C C
AB 0 1 AB 0 1
00 m0 m1 00 1 1
01 m2 m3 01 1 0
11 m6 m7 11 1 0
10 m4 m5 10 0 0
Note that the two representations shown (Figure 3.5 and Figure 3.6) are equivalent,
and you may work with whichever representation that you are more comfortable
page 37 of 101
34
with. The only thing you should keep in mind is the order in which the variables
appear – in this case, they appear in the order A (MSB), B and C (LSB).
PSfrag replacements
4-variable K-map
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 m0 m4 m12 m8 00 0 0 0 0
01 m1 m5 m13 m9 01 1 1 1 0
11 m3 m7 m15 m11 11 0 0 1 0
10 m2 m6 m14 m10 10 0 0 0 0
3.1.3 Looping
The Logic function can be simplified by properly combining those squares in the that
contain 1s. The process of combining 1s is called looping. The number of 1s that can
be looped together should be a power of 2 (1, 2, 4, 8, 16 e.t.c.).
page 38 of 101
35
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 m0 m1 m3 m2 00 0 1 0 0
01 m4 m5 m7 m6 01 0 1 0 0
10 m8 m9 m11 m10 10 0 0 0 0
Groups of 2 (Pairs)
Two ones can be looped together if they are horizontally or vertically adjacent. Two
PSfrag replacements
ones next to each other diagonally are not adjacent. Looping a pair of adjacent 1s in a
K-map eliminates the variable that appears in the complemented and uncomplemented form.
Variables that are the same C
for all cells of the loop must appear in the final expression.
Example
Consider the K-map shown on Figure 3.9.
AB
C ĀB̄ ĀB AB AB̄
C̄ 0 1 1 0
C 0 0 0 0
The two 1s shown in the K-map are horizontally adjacent and can be looped together
as a pair as shown in the figure. Looking at the cells enclosed in the loop, we can
see that variable A appears as Ā in one cell (complemented form) and as A (uncom-
plemented form) in the other cell hence it is eliminated. Variable B appears as B in
both cells and variable C appears as C̄ so the simplified expression is:
x = B C̄
Example
Consider the K-map shown on Figure 3.10.
The two ones are vertically adjacent and the variable C is the one that changes and
is eliminated hence:
x = ĀB
page 39 of 101
C
36
AB
C ĀB̄ ĀB AB AB̄
C̄ 0 1 0 0
C 0 1 0 0
PSfrag replacements
The leftmost column and the rightmost column of the K-map are considered to be
adjacent. Similarly, the top row and the bottom row of a K-map are considered to be
adjacent. C
Example
Consider the K-map shown on Figure 3.11.
AB
C ĀB̄ ĀB AB AB̄
C̄ 1 0 0 1
C 0 0 0 0
In this case,
x = B̄ C̄
Groups of 4 (Quads)
Four 1s PSfrag
can be replacements
looped together if they are horizontally adjacent, vertically adjacent
or form a square. A loop of four 1s eliminates 2 variables that appear in both com-
plemented and uncomplemented
C form.
Example
Consider the K-map shown on Figure 3.12.
AB
C ĀB̄ ĀB AB AB̄
C̄ 0 0 0 0
C 1 1 1 1
page 40 of 101
37
The four 1s are horizontally adjacent and are looped together to give:
PSfrag replacements
x=C
Example
Consider the K-map shown on Figure 3.13.
AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 1 0 0
C̄D 0 1 0 0
CD 0 1 0 0
C D̄ 0 1 0 0
The four 1s are vertically adjacent and are looped together to give:
PSfrag replacements
x = ĀB
Example
AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 1 1 0
C̄D 0 1 1 0
CD 0 0 0 0
C D̄ 0 0 0 0
The four 1s in Figure 3.14 form a square and are looped together to give:
x = B C̄
Other examples of quads are shown on Figure 3.15, where x = B̄D for the K-map on
the left and x = B D̄ for the K-map on the right.
page 41 of 101
38
AB AB
CD ĀB̄ ĀB AB AB̄ CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 0 0 0 C̄ D̄ 0 1 1 0
C̄D 1 0 0 1 C̄D 0 0 0 0
PSfrag replacements
CD 1 0 0 1 CD 0 0 0 0
C D̄ 0 0 0 0 C D̄ 0 1 1 0
Figure 3.16: The 1s at the corners are adjacent and can looped together
Since the top row of a K-map is adjacent to the bottom row, and the right column to
the left, the corner cells of a K-map are also considered adjacent and can be looped
together if they all contain 1s, as shown on Figure 3.16.
PSfragInreplacements
this case, x = B̄ D̄.
Groups of 8 (octets)
Eight ones may be looped together if they are adjacent. A loop of eight 1s eliminates
3 variables. Examples of octets are shown on Figure 3.17.
AB AB
CD ĀB̄ ĀB AB AB̄ CD ĀB̄ ĀB AB AB̄
C̄ D̄ 1 1 0 0 C̄ D̄ 1 1 1 1
C̄D 1 1 0 0 C̄D 0 0 0 0
CD 1 1 0 0 CD 0 0 0 0
C D̄ 1 1 0 0 C D̄ 1 1 1 1
x = Ā x = D̄
page 42 of 101
39
2. Examine the map and loop those 1s which are not adjacent to any other 1s.
these are called isolated 1s.
3. Identify those 1s that are adjacent to only one other 1. Loop any pair containing
such a 1. Adjacent ones which can be combined in more than one way are
temporarily bypassed.
4. Identify those 1s which can be combined with three other 1s in only one way.
If not all four 1s so involved have already been looped as pairs, loop the four
1s. The 1s that can be looped in a group of four in more than one way are
temporarily bypassed.
6. Loop any quad that contains one or more 1s that have not yet been looped.
7. Loop any pairs necessary to include any 1s that have not yet been looped, mak-
ing sure to use the minimum number of loops.
Note: If the expression you obtain using the steps above can be simplified further by
algebraic means, it means you have not looped properly - you may be using too many
loops and/or your loops may not be large enough.
Carefully go through the examples below, and see if you can come up with the same
loops. These examples have been looped in such a way as to obtain the simplest
possible expressions.
Example
page 43 of 101
PSfrag replacements
40
AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 0 0 1
C̄D 0 1 1 0
PSfrag replacements CD 0 1 1 0
C D̄ 0 0 1 0
C̄D 0 1 1 1
PSfrag replacements
CD 1 1 1 0
C D̄ 0 0 1 0
So far, we have talked about obtaining Sum of Products expressions from K-maps. It
is also possible to obtain Product of Sums expressions – only this time we loop the
zeros together, not the ones. The examples below illustrate the procedure.
Example
From Figure 3.21, x = B̄ + C̄ + D̄ A + D̄
Example
page 44 of 101
41
PSfrag replacements
AB
CD 00 01 11 10
00 1 1 1 1
01 0 0 1 1
11 0 0 0 1
10 1 1 1 1
Figure 3.21:replacements
PSfrag Example: looping the 0s to obtain a product of sums expression
AB
CD 00 01 11 10
00 0 0 1 1
01 1 0 0 1
11 0 0 0 0
10 1 0 0 1
From Figure 3.22, x = (A + C + D) B̄ + D̄ C̄ + D̄ B̄ + C̄
Note that for a given K-map, looping the 1s and looping the zeros gives the same results,
only that the results are expressed in different ways. Consider the example shown on
PSfragFigure 3.23 where in one case the 1s are looped and in the other case the 0s are
replacements
looped.
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 0 0 0 0 00 0 0 0 0
01 0 1 1 1 01 0 1 1 1
11 0 1 1 1 11 0 1 1 1
10 0 1 1 1 10 0 1 1 1
Figure 3.23: Example: looping 0s or 1s gives same result expressed in different ways
x = AD + BD + BC + AC
page 45 of 101
42
x = (C + D) (A + B)
Opening the brackets of the Product of Sums expression will yield the Sum of Prod-
ucts expression obtained by looping the 1s, showing the two expressions are equiva-
lent.
These are also referred to as Unused terms, Forbidden terms or Redundant terms.
These terms describe combinations of variables which never occur in practice. In a
truth-table or a K-map, these inputs are represented by an X, an R or a d. As an
example, suppose that we have a digital circuit with three inputs and one output,
and the input combinations 000, 001 and 010 give an output 0, input combinations
101, 110 and 111 give an output 1, and input combinations 011 and 100 never occur
in practice. The truth-table for this circuit is as shown below:
A B C output
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 X
1 0 0 X
1 0 1 1
1 1 0 1
PSfrag replacements
1 1 1 1
When designing with K-maps containing don’t care variables, the designer can make
the output of any don’t care condition either a 1 or a 0 in order to produce the sim-
plest output expression. This is illustrated on Figure 3.24 for the truth-table above.
AB AB
C ĀB̄ ĀB AB AB̄ C ĀB̄ ĀB AB AB̄
C̄ 0 0 1 X C̄ 0 0 1 1
C 0 X 1 1 C 0 0 1 1
x = Ā
Figure 3.24: Example: simplifying a Boolean expression with don’t care terms
page 46 of 101
43
1. Derive the minimized expression for the function in sum of products form (ob-
tained by minimizing Boolean expressions algebraically or by looping 1s in a
K-map).
x = AB + BC + AC = AB + BC + AC
= AB · BC · AC
which is implemented as shown on Figure 3.25.
A
PSfrag replacements
B x
1. Derive the minimized expression for the function in product of sums form (ob-
tained by looping the 0s in a K-map).
page 47 of 101
44
and we were to implement this expression using NOR gates only, we then apply the
above steps as follows:
x = (A + B) (B + C) (A + C) = (A + B) (B + C) (A + C)
= (A + B) + (B + C) + (A + C)
which is implemented as shown on Figure 3.26.
A
PSfrag replacements
B x
page 48 of 101
BTECH. ELECTRICAL AND ELECTRONICS ENGINEERING
c)
d)
e)
f)
g)
h)
i)
j)
k)