0% found this document useful (0 votes)
127 views56 pages

Lecture #4 - Simplification of Boolean Functions

This document discusses techniques for simplifying Boolean functions including canonical forms, K-maps, and converting between sum of products and product of sums forms. Specifically, it covers: 1. Canonical forms such as sum of products (SOP) and product of sums (POS) and their use of minterms and maxterms. 2. Karnaugh maps and their use for simplifying Boolean functions through grouping and don't care conditions. 3. Converting between SOP and POS forms by replacing minterms with maxterms or vice versa using their complement relationships. 4. Examples of expressing Boolean functions as sums of minterms and products of maxterms and converting between the two forms.

Uploaded by

Onyango Bernard
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
127 views56 pages

Lecture #4 - Simplification of Boolean Functions

This document discusses techniques for simplifying Boolean functions including canonical forms, K-maps, and converting between sum of products and product of sums forms. Specifically, it covers: 1. Canonical forms such as sum of products (SOP) and product of sums (POS) and their use of minterms and maxterms. 2. Karnaugh maps and their use for simplifying Boolean functions through grouping and don't care conditions. 3. Converting between SOP and POS forms by replacing minterms with maxterms or vice versa using their complement relationships. 4. Examples of expressing Boolean functions as sums of minterms and products of maxterms and converting between the two forms.

Uploaded by

Onyango Bernard
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 56

Digital Electronic Principles

Simplification of
1
Boolean Functions

Lecture #4 Simplification of Boolean Functions


2 Simplification of Boolean Functions
 Canonical/Standard Forms of Logic
 Sum of Product (SOP)
 Product of Sum (POS)
 Minterm and Maxterm
 K-Map structure
 2,3, and 4-variable Karnaugh Maps
 K-Map Grouping and Logic Simplification
 K-Map SOP and POS terms
 K-Map Don’t Care Conditions
 Logic Design using K-Maps
Lecture #4 Simplification of Boolean Functions
3 Canonical Forms
Any Boolean function that is expressed as a sum of
minterms or as a product of maxterms is said to be in its
canonical form.

Lecture #4 Simplification of Boolean Functions


4 Minterms
 A minterm is a special product of literals, in which each input variable appears
exactly once.
 A function with n variables has 2n minterms (since each variable can appear
complemented or not)
 A three-variable function, such as f(x,y,z), has 23 = 8 minterms:
x'y'z' x'y'z x'yz' x'yz
xy'z' xy'z xyz' xyz
 Each minterm is true for exactly one combination
of inputs:
 This is as shown on the right.

Lecture #4 Simplification of Boolean Functions


5 Sum of minterms form
 Every function can be written as a sum of minterms, which is a special kind of sum
of products form
 The sum of minterms form for any function is unique
 If you have a truth table for a function, you can write a sum of minterms expression
just by picking out the rows of the table where the function output is 1 (1-minterm).
f = x'y'z' + x'y'z + x'yz' + x'yz + xyz'
= m0 + m1 + m2 + m3 + m6
= ∑(0, 1, 2, 3, 6)

f ' = xy'z' + xy'z + xyz


= m4 + m5 + m7
= ∑(4, 5, 7)

f ' contains all the minterms not in f

Lecture #4 Simplification of Boolean Functions


Sum of minterms: practice 1
6
 Express the Boolean function F = A + B'C as a sum of minterms. The function has
three variables: A, B, and C.
Soln:
 The first term A is missing two variables (B&C): therefore. A = A(B + B') = AB + AB'
 This function is still missing one variable, C, so A = AB(C + C') + AB'(C + C')
= ABC + ABC' + AB'C + AB'C'
 The second term B'C is missing one variable: hence.
B'C = B'C(A + A') = AB'C + A'B'C
 Combining all terms. we have: F = A + B'C
= ABC + ABC' + AB'C + AB'C + AB'C'+ A'B'C
 But realise that AB'C appears twice, and from the theorems (x + x = x), it is
possible to remove one of those occurrences. Rearranging the minterms in
ascending order. we finally obtain:
F = A'B'C + AB'C' + AB'C + ABC' + ABC
= m1 + m4 + m5 + m6 + m7
 Therefore: F(A, B, C) = ∑(1, 4, 5, 6, 7)

Lecture #4 Simplification of Boolean Functions


7
Sum of minterms: practice 1 Cont.
Express the Boolean function F = A + B'C as a sum of
minterms. The function has three variables: A, B, and C.
Soln:
 An alternative procedure for deriving the minterms of a Boolean function is to
obtain the truth table of the function directly from the algebraic expression and then
read the minterms from the truth table.
 From the truth table, we can then read the five
minterms of the function to be 1, 4 , 5, 6. and 7. 0

Lecture #4 Simplification of Boolean Functions


8 Sum of minterms: practice 2
 F = x + yz, express this in the sum of minterms?
= x(y + y')(z + z') + (x + x')yz
= xyz + xyz' + xy'z + xy'z' + xyz + x'yz
= x'yz + xy'z' + xy'z + xyz' + xyz
= ∑(3, 4, 5, 6, 7) Remember from the complement axiom:
(x + x'), (y + y'), (z + z') = 1

 or, convert the expression into truth-table and then read the minterms
from the table

Lecture #4 Simplification of Boolean Functions


Maxterms
9  A maxterm is a sum of literals, in which each input variable appears exactly
once.
 A function with n variables has 2n maxterms
 The maxterms for a three-variable function f(x,y,z):
(x' + y' + z‘) (x' + y' + z ) (x' + y + z‘) (x' + y + z)
(x + y' + z‘) (x + y' + z) (x + y + z‘) (x + y + z)
 Each maxterm is false for exactly one combination
of inputs:

Lecture #4 Simplification of Boolean Functions


10 Product of maxterms form
 Every function can be written as a unique product of maxterms
 If you have a truth table for a function, you can write a product of maxterms
expression by picking out the rows of the table where the function output is
0 (0-maxterm).
f = (x' + y + z)(x' + y + z')(x' + y' + z')
= M4M5M7
= π(4, 5, 7)

f ' = (x + y + z)(x + y + z')(x + y' + z)


(x + y' + z')(x' + y' + z)
= M0M1M2M3M6
= π(0, 1, 2, 3, 6)

f ' contains all the maxterms not in f

Lecture #4 Simplification of Boolean Functions


11
Product of maxterms: practice 1
 Express the Boolean function F = xy + x'z as a product of maxterms.
Soln:
 First, convert the function into OR terms by using the distributive law:
F = xy + x'z = (xy + x')(xy + z)
= (x + x')(y + x')(x + z)(y + z)
= (x' + y)(x + z)(y + z)
 The function has three variables: x, y, and z. Each OR term is missing one variable;
therefore,
x' + y = x' + y + zz' = (x' + y + z)(x' + y + z')
x + z = x + z + yy' = (x + y + z)(x + y' + z)
y + z = y + z + xx' = (x + y + z)(x' + y + z)
 Combining all the terms and removing those which appear more than once. we
finally obtain
F = (x + y + z)(x + y' + z)(x' + y + z)(x' + y + z')
= M0M2M4M5
 A convenient way to express this function is as follows:
F(x, y, z)= π(0, 2, 4, 5)

Lecture #4 Simplification of Boolean Functions


12 Product of maxterms: practice 2
 F = x'y' + xz, express this in the product of maxterms?
= (x'y' + x)(x'y' + z)
= (x' + x)(y' + x)(x' + z)(y' + z)
= (x + y')(x' + z)(y' + z)
= (x + y' + zz')(x' + z + yy')(xx' + y' + z)
= (x + y' + z)(x + y' + z')(x' + y + z)(x' + y' + z)(x + y' + z)(x' + y' + z)
= (x + y' + z)(x + y' + z')(x' + y + z)(x' + y' + z)
= π(2, 3, 4, 6)

 or, convert the expression into truth-table and then read the
maxterms from the table

Lecture #4 Simplification of Boolean Functions


13
Minterms and maxterms are related
 Any minterm mi is the complement of the corresponding maxterm Mi
m'i = Mi

 For example, m4' = M4 because (xy'z')' = x' + y + z

Lecture #4 Simplification of Boolean Functions


14
Converting between canonical forms
 We can convert a sum of minterms to a product of maxterms
From before F = ∑(0,1,2,3,6)
and F' = ∑(4,5,7)
= m4 + m5 + m7
complementing (F')' = (m4 + m5 + m7)'
so F = m4' m5' m7' [DeMorgan’s law]
= M4 M5 M7
= π(4,5,7)
 In general, just replace the minterms with maxterms, using maxterm numbers that
don’t appear in the sum of minterms:
F = ∑(0,1,2,3,6)
= π(4,5,7)
 The same thing works for converting from a product of maxterms to a sum of
minterms

Lecture #4 Simplification of Boolean Functions


15
Converting between canonical forms
A general conversion procedure is as below:
 To convert from one canonical form to another, interchange the
symbols ∑ and π and list those numbers missing from the original
form. In order to find the missing terms, one must realize that the
total number of minterms or maxterms is 2n, where n is the number of
binary variables in the function.
 A Boolean function can be converted from an algebraic expression to
a product of maxterms by means of a truth table and the canonical
conversion procedure.

Lecture #4 Simplification of Boolean Functions


16 Standard Forms
 The two canonical forms of Boolean algebra are basic forms that one
obtains from reading a given function from the truth table. These
forms are very seldom the ones with the least number of literals,
because each minterm or maxterm must contain by definition, all the
variables. either complemented or uncomplemented.
 Another way to express Boolean functions is in standard form. In this
configuration, the terms that form the function may contain one, two,
or any number of literals. There are two types of standard forms: the
sum of products and products of sums.

Lecture #4 Simplification of Boolean Functions


17
Standard Forms
 Any Boolean function that is expressed as a Sum of Products (SOP)
or as a Product of Sums (POS), where each product-term or sum-
term may require fewer than (n-1) operations, is said to be in its
standard form.
 Standard forms are not unique, there can be several different SOPs
and POSs for a given function.
 A SOP expression contains:
– Only OR (sum) operations at the ― outermost level
– Each term (implicate) must be a product of literals
f(x,y,z) = xy + x'yz + xy'z
 A POS expression contains:
– Only AND (product) operations at the ― outermost level
– Each term (implicate) must be a sum of literals
f(x,y,z) = (x' + y')(x + y' + z')(x' + y + z')

Lecture #4 Simplification of Boolean Functions


18 Standard Forms: Sum of Products (SOP)
 An example of a function expressed as a sum of products is: F1 = y' + xy + x'yz'
 The expression has three product terms, with one, two, and three literals. Their
sum is, in effect, an OR operation.
 The logic diagram of a sum-of-products expression consists of a group of AND
gates followed by a single OR gate. This configuration pattern is shown below.

Each product term requires an AND gate, except for a


term with a single literal. The logic sum is formed with
an OR gate whose inputs are the outputs of the AND
gates and the single literal. It is assumed that the input
variables are directly available in their complements, so
inverters are not included in the diagram. This circuit
configuration is referred to as a two-level
implementation.

Lecture #4 Simplification of Boolean Functions


19 Standard Forms: Product of Sums (POS)
 An example of a function expressed as a product of sums is: F2 = x(y' + z)(x' + y + z)
 This expression has three sum terms, with one, two, and three literals. The product
is an AND operation.
 The gate structure of the product-of-sums expression consists of a group of OR
gates for the sum terms (except for a single literal), followed by an AND gate, as
shown below. This standard type of expression results in a two- level gating
structure .

Lecture #4 Simplification of Boolean Functions


20 Exercise:
Draw the AND-OR circuits for the following Sum-of-
Products (SOP) expressions:
1. F1 = A'B + AC' + B'C
2. F2 = ABD + BCD' + AB'C' + B'CD

Lecture #4 Simplification of Boolean Functions


21 Exercise:
Draw the OR-AND circuits for the following Product-of-
Sums (POS) expressions:
1. F1 = (A+B').(A'+C).(B+C')
2. F2 = (A+B+D).(B'+C+D').(A'+B+C).(B+C'+D)

Lecture #4 Simplification of Boolean Functions


22

Lecture #4 Simplification of Boolean Functions


23 Karnaugh Maps: K-maps
Karnaugh Map (K-Map) is a tool for simplifying and
manipulating digital logic expressions with 2-6 variables
K-Map, if properly used will produce the simplest SOP
(Sum Of Products) and POS (Product Of Sums) expression
possible, known as the minimum expression
K-Map simplifies logic through SOP and POS Boolean
expressions, and truth table
In this class, we’ll look at logic simplification of 2, 3, and 4
variables

Lecture #4 Simplification of Boolean Functions


24 Karnaugh Map Advantages
Minimization can be done more systematically
Much simpler to find minimum solutions
Easier to see what is happening (graphical)
Almost always used instead of Boolean minimization.

Lecture #4 Simplification of Boolean Functions


25 Definitions
 Literal: each appearance of a variable, either uncomplemented or
complemented
 Implicant: a product term that implies F=1
 Prime Implicant: an implicant that cannot be combined into another
implicant that has fewer literals
– Cannot be further minimized
 Essential Prime Implicant: a prime implicant that covers a minterm
uniquely.

Lecture #4 Simplification of Boolean Functions


Definitions
26
 Implicants  Prime Implicants

Implicants: A'B'C', A'B'C, A'BC', A'BC, ABC (minterms)


Prime Implicants: BC, A'
 Essential Prime Implicants

Implicants: A'B'C', A'B'C, A'BC', A'BC, ABC (minterms)


A'C', A'C, A'B', A'B, BC (pairs of minterms)

Essential Prime Implicants: BC, A'

Implicants: A'B'C', A'B'C, A'BC', A'BC, ABC (minterms)


A'C', A'C, A'B', A'B, BC (pairs of minterms)
A' (quartet of minterms)

Lecture #4 Simplification of Boolean Functions


27
Rules for K-Maps
1. Each cell with a 1 must be included in at least one group.
2. Try to form the largest possible groups.
3. Try to end up with as few groups as possible.
4. Groups may be in sizes that are powers of 2: 20 = 1, 21 = 2, 22 = 4, 23 = 8, 24 = 16, ...
5. Groups may be square or rectangular only (including wraparound at the grid edges).
No diagonals or zigzags can be used to form a group.
6. The larger a group is, the more redundant inputs there are:
i. A group of 1 has no redundant inputs.
ii. A group of 2 has 1 redundant input.
iii. A group of 4 has 2 redundant inputs.
iv. A group of 8 has 3 redundant inputs.
v. A group of 16 has 4 redundant inputs.

Lecture #4 Simplification of Boolean Functions


28
K-maps Representation
 A two-variable function has four possible minterms. We can re-arrange these minterms into a
Karnaugh map (K-map).
x y minterm Y
0 0 x’y’ 0 1
0 1 x’y 0 x’y’ x’y
1 0 xy’ X
1 xy’ xy
1 1 xy

 Now we can easily see which minterms contain common literals


– Minterms on the left and right sides contain y' and y respectively
– Minterms in the top and bottom rows contain x' and x respectively
Y

0 1 Y’ Y
0 x’y’ x’y X’ x’y’ x’y
X
1 xy’ xy X xy’ xy

Lecture #4 Simplification of Boolean Functions


Karnaugh Map Simplifications
29
 Imagine a two-variable sum of minterms:

x'y' + x'y

 Both of these minterms appear in the top row of a Karnaugh map, which means
that they both contain the literal x'
Y
x’y’ x’y
X xy’ xy

 What happens if you simplify this expression using Boolean algebra?

x’y’ + x’y = x’(y’ + y) [ Distributive ]


= x’  1 [ y + y’ = 1 ]
= x’ [x1=x]

Lecture #4 Simplification of Boolean Functions


Karnaugh Map Simplifications
30 More Two-Variable Examples
 Another example expression is x'y + xy
– Both minterms appear in the right side, where y is uncomplemented
– Thus, we can reduce x'y + xy to just y

Y
x’y’ x’y
X xy’ xy

 How about x'y' + x'y + xy?


– We have x'y' + x'y in the top row, corresponding to x'
– There’s also x'y + xy in the right side, corresponding to y
– This whole expression can be reduced to x' + y
Y
x’y’ x’y
X xy’ xy

Lecture #4 Simplification of Boolean Functions


31 A Three-Variable Karnaugh Map
 For a three-variable expression with inputs x, y, z, the arrangement of minterms is
more tricky:
YZ YZ
00 01 11 10 00 01 11 10
0 x’y’z’ x’y’z x’yz x’yz’ 0 m0 m1 m3 m2
X X
1 xy’z’ xy’z xyz xyz’ 1 m4 m5 m7 m6

 Another way to label the K-map (use whichever you like):

Y Y
x’y’z’ x’y’z x’yz x’yz’ m0 m1 m3 m2
X xy’z’ xy’z xyz xyz’ X m4 m5 m7 m6
Z Z

Lecture #4 Simplification of Boolean Functions


32 Why the funny ordering?
 With this ordering, any group of 2, 4 or 8 adjacent squares on the map contains
common literals that can be factored out
Y x’y’z + x’yz
x’y’z’ x’y’z x’yz x’yz’ = x’z(y’ + y)
X xy’z’ xy’z xyz xyz’ = x’z  1
Z = x’z

 “Adjacency” includes wrapping around the left and right sides:


Y x’y’z’ + xy’z’ + x’yz’ + xyz’
x’y’z’ x’y’z x’yz x’yz’ = z’(x’y’ + xy’ + x’y + xy)
X xy’z’ xy’z xyz xyz’ = z’(y’(x’ + x) + y(x’ + x))
Z
= z’(y’+y)
= z’

 We’ll use this property of adjacent squares to do our simplifications.

Lecture #4 Simplification of Boolean Functions


33 Remember:
 K-maps define Boolean functions.
 K-maps are equivalent to Truth Tables or Boolean Expressions.
 K-maps aid visually identifying Prime Implicants (blocks of 2, 4,
8, ...adjacent squares whose values are 1) and Essential Prime
Implicants (Prime Implicants that contain a 1-minterm that is not
included in any other Prime Implicants) in each Boolean
function.
 K-maps are good for manual simplification of Boolean functions.

Lecture #4 Simplification of Boolean Functions


K-map Simplification of SoP Expressions
34  Let’s consider simplifying f(x,y,z) = xy + y’z + xz
 First, you should convert the expression into a sum of minterms form,
– The easiest way to do this is to make a truth table for the function, and then read off the
minterms
– You can either write out the literals or use the minterm shorthand
 Here is the truth table and sum of minterms for our example:
x y z f(x,y,z)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0 f(x,y,z) = x’y’z + xy’z + xyz’ + xyz
1 0 0 0 = m1 + m5 + m6 + m7
1 0 1 1
1 1 0 1
1 1 1 1

Lecture #4 Simplification of Boolean Functions


Unsimplifying Expressions
35
 You can also convert the expression to a sum of minterms with Boolean
algebra
– Apply the distributive law in reverse to add in missing variables.
– Very few people actually do this, but it’s occasionally useful.

xy + y’z + xz = (xy  1) + (y’z  1) + (xz  1)


= (xy  (z’ + z)) + (y’z  (x’ + x)) + (xz  (y’ + y))
= (xyz’ + xyz) + (x’y’z + xy’z) + (xy’z + xyz)
= xyz’ + xyz + x’y’z + xy’z
= m1 + m5 + m6 + m7

 In both cases, we’re actually “unsimplifying” our example expression


– The resulting expression is larger than the original one!
– But having all the individual minterms makes it easy to combine them together with the
K-map

Lecture #4 Simplification of Boolean Functions


Making the Example K-map
36  Next up is drawing and filling in the K-map.
– Put 1s in the map for each minterm, and 0s in the other squares.
– You can use either the minterm products or the shorthand to show you where the 1s and
0s belong.
 In our example, we can write f(x,y,z) in two equivalent ways
f(x,y,z) = x'y'z + xy'z + xyz' + xyz f(x,y,z) = m1 + m5 + m6 + m7
Y Y
x’y’z’ x’y’z x’yz x’yz’ m0 m1 m3 m2
X xy’z’ xy’z xyz xyz’ X m4 m5 m7 m6
Z Z
 In either case, the resulting K-map is shown below
Y
0 1 0 0
X 0 1 1 1
Z

Lecture #4 Simplification of Boolean Functions


K-maps From Truth Tables
37  We can fill in the K-map directly from a truth table
– The output in row i of the table goes into square mi of the K-map
– Remember that the rightmost columns of the K-map are “switched/ reversed/
exchanged”
Y
x y z f(x,y,z) m0 m1 m3 m2
0 0 0 0 X m4 m5 m7 m6
0 0 1 1 Z
0 1 0 0
0 1 1 0
Y
0 1 0 0
X 0 1 1 1
Z
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1

Lecture #4 Simplification of Boolean Functions


Grouping the Minterms Together
38
 The most difficult step is grouping together all the 1s in the K-map
– Make rectangles around groups of one, two, four or eight 1s
– All of the 1s in the map should be included in at least one rectangle
– Do not include any of the 0s
Y
0 1 0 0
X 0 1 1 1
Z
 Each group corresponds to one product term. For the simplest result:
– Make as few rectangles as possible, to minimize the number of products in the final
expression.
– Make each rectangle as large as possible, to minimize the number of literals in
each term.
– Rectangles can be overlapped, if that makes them larger.

Lecture #4 Simplification of Boolean Functions


Reading the MSP from the K-map
39
 Finally, you can find the Minimal Sum of Product (MSP) expression
– Each rectangle corresponds to one product term
– The product is determined by finding the common literals in that rectangle
Y
0 1 0 0
X 0 1 1 1
Z
Y
x’y’z’ x’y’z x’yz x’yz’
X xy’z’ xy’z xyz xyz’
Z

For our example, we find that xy + y'z + xz = y'z + xy.


F(x,y,z)= y'z + xy

Lecture #4 Simplification of Boolean Functions


Practice K-map 1
40
 Simplify the sum of minterms: m1 + m3 + m5 + m6
Y
m0 m1 m3 m2
X m4 m5 m7 m6
Z
Solution
 Here is the filled in K-map, with all groups shown
 The magenta and green groups overlap, which makes each of them as large as possible
 Minterm m6 is in a group all by its lonesome
Y
0 1 1 0
X 0 1 0 1
Z
 The final MSP here is x'z + y'z + xyz'
Lecture #4 Simplification of Boolean Functions
K-maps can be tricky!
41
 There may not necessarily be a unique MSP. The K-map below yields two valid and
equivalent MSPs, because there are two possible ways to include minterm m7

Y
0 1 0 1
X 0 1 1 1
Z

Y Y
0 1 0 1 0 1 0 1
X 0 1 1 1 X 0 1 1 1
Z Z
y’z + yz’ + xy y’z + yz’ + xz

 Remember that overlapping groups is possible, as shown above

Lecture #4 Simplification of Boolean Functions


Example: Three-Variable k-map
42  Simplify the Boolean function: F(x,y,z) = ∑(2,3,4,5)
SOLUTION:
 First. a 1 is marked in each minterm that represents the function. This is shown in the k-map below in
which the squares for minterm 010, 011, 100, and 101 are marked with 1’s. The next step is to find
possible adjacent squares. These are indicated in the map by two rectangles, each enclosing two 1's.
The upper right rectangle represents the area enclosed by x'y, This area is determined by observing that
the two-square area is in row 0, corresponding x', and the last two columns, corresponding to y.
Similarly. the lower left rectangle represents the product term xy'. (The second row represents x and the
two left columns represent y'.) The logical sum of these two product terms gives the simplified
expression
F = x'y + xy'
y
yz x'y
x 00 01 11 10
M0 M1 M3 M2
0 1 1
M4 M5 M7 M6
x 1
1 1

xy' z

Therefore, F(x,y,z) = ∑(2,3,4,5) = x'y + xy


Example: Three-Variable k-map
43  Simplify the Boolean function: F(x, y, z ) = ∑( 3,4,6,7)
SOLUTION:
 The k-map for this function is shown below. There are four squares marked with 1's, one for each
minterm of the function . Two adjacent squares are combined in the third column to give a two-literal
term yz. The remaining two squares with 1's are also adjacent by the new definition. These two squares
when combined, give the two-literal term xz'. The simplified function then becomes
F = yz + xz'

y
yz yz
x 00 01 11 10
M0 M1 M3 M2
0 1 Note: xy'z' + xyz' = xz'
M4 M5 M7 M6
x 1
1 1 1
xy'z'
z xyz'

Therefore, F(x, y, z ) = ∑( 3,4,6,7) = yz + xz'


Example: Three-Variable k-map BC B

44 A 00 01 11 10 A'B
 Let the Boolean function: F = A'C + A'B + AB'C + BC
0 1 1 1
a) Express this function as a sum of minterms.
b) Find the minimal sum of products expression. A 1
1 1 C
SOLUTION:
C
 Three product terms in the expression have two literals and are represented in a three variable k-map
by two squares each. The two squares corresponding to the first term, A'C, above from the coincidence
of A' (first row) and C (two middle columns) to give squares 001 and 011. Note that, in marking 1's in the
squares, it is possible to find a 1 already placed there from a preceding term. This happens with the
second term, A'B, which has 1's in squares 011 and 010. Square 011 is common with the first term, A'C,
though, so only one 1 is marked in it. Continuing in this fashion, we determine that the term AB'C
belongs in square 101, corresponding to minterm 5, and the term BC has two 1's in squares 011 and
111. The function has a total of five minterms, as indicated by the five 1's in the k-map.
a) The minterms are read directly from the k-map to be 1,2,3,5, and 7. The function can be
expressed in sum of minterms form as
F(A , B, C) = ∑(1, 2, 3, 5, 7)
b) The sum-of-products expression. as originally given. has too many terms. It can be simplified.
as shown in the map, to an expression with only two terms:
F = C + A'B
Four-variable K-maps
45  We can do four-variable expressions too!
– The minterms in the third and fourth columns, and in the third and fourth rows, are
switched around.
– Again, this ensures that adjacent squares have common literals
Y Y
w’x’y’z’ w’x’y’z w’x’yz w’x’yz’ m0 m1 m3 m2
w’xy’z’ w’xy’z w’xyz w’xyz’ m4 m5 m7 m6
X X
wxy’z’ wxy’z wxyz wxyz’ m12 m13 m15 m14
W W
wx’y’z’ wx’y’z wx’yz wx’yz’ m8 m9 m11 m10
Z Z

 Grouping minterms is similar to the three-variable case, but:


– You can have rectangular groups of 1, 2, 4, 8 or 16 minterms
– You can wrap around all four sides

Lecture #4 Simplification of Boolean Functions


Example: Four-Variable k-map
 Simplify the Boolean function: F(w,x,y,z) = ∑(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
46
SOLUTION:
 Since the function has four variables, a four-variable map must be used. The minterms listed in the sum
are marked by 1's in the k-map. Eight adjacent squares marked with 1’s can be combined to form the
one literal term y'. The remaining three 1's on the right cannot be combined to give a simplified term;
they must be combined as two or four adjacent squares.
The larger the number of squares combined, the smaller is the number of literals in the term. In this
example, the top two 1’s on the right are combined with the top two 1's on the left to give the term w'z'.
Note that it is permitted to use the same square more than once. We are now left with a square marked
by 1 in the third row and fourth column (square 1110). Instead of taking this square alone (which will give
a term with four literals), we combine it with squares already used to form an area of four adjacent
squares. These squares make up the two middle rows and the two end columns giving the term xz'.
yz
wx 00 01 11 10
w'y'z'
00 1 1 1 w'yz'
01 1 1 1 Note: w'y'z' + w'yz' = w'z'
xy'z' And xy'z' + xyz' = xz'
11 1 1 1 xyz'
10 1 1
y'
The simplified function is: F = y' + w'z' + xz'
Example: Four-Variable k-map
47  Simplify the Boolean function: F =' A'B'C' + B'CD ' + A 'BCD' + AB'C‘
SOLUTION:
 The area in the map covered by this function consists of the squares marked with 1's as shown in the k-
map.
The function has four variables and, as expressed, consists of three terms with three literals each and
one term with four literals. Each term with three literals is represented in the map by two squares. For
example, A'B'C' is represented in squares 0000 and 0001. The function can be simplified in the map by
taking the 1's in the four corners to give the term B'D'. This is possible because these four squares are
adjacent when the map is drawn in a surface with top and bottom edges, as well as left and right edges,
touching one another. The two left-hand 1's in the top row are combined with the two 1's in the bottom
row to give the term B'C'. The remaining 1 may be combined in a two-square area to give the term
A‘CD'. CD
AB 00 01 11 10
A'B'C'
00 1 1 1 A'B'CD' Note:
A'B'C'D' A'B'C'D' + A'B'CD' = A'B'D'
01 1 A'CD' AB'C'D' + AB'CD' = AB'D'
A'B'D' + AB'D' = B'D'
11
A'B'C' + A'B'C' = B'C'
AB'C'D' 10 1 CV 1 CV
1 AB'CD'

AB'C' The simplified function is: F = B'D ' + B'C' + A'CD'


Example: Simplify w'y'z' + wz + xyz + w'y
48
 First and foremost, draw the K-map representing the Boolean equation
given:

 The resulting MSP is: w'z' + wz + yz or w'z' + wz + w'y.

Lecture #4 Simplification of Boolean Functions


Example: Simplify m0+m2+m5+m8+m10+m13
49  The expression is already a sum of minterms, so here’s the K-map:
Y Y
1 0 0 1 m0 m1 m3 m2
0 1 0 0 m4 m5 m7 m6
X X
0 1 0 0 m12 m13 m15 m14
W W
1 0 0 1 m8 m9 m11 m10
Z Z

 We can make the following groups, resulting in the MSP x'z' + xy'z
Y Y
1 0 0 1 w’x’y’z’ w’x’y’z w’x’yz w’x’yz’
0 1 0 0 w’xy’z’ w’xy’z w’xyz w’xyz’
X X
0 1 0 0 wxy’z’ wxy’z wxyz wxyz’
W W
1 0 0 1 wx’y’z’ wx’y’z wx’yz wx’yz’
Z Z

Lecture #4 Simplification of Boolean Functions


Don’t - Care Conditions
50  You don’t always need all 2n input combinations in an n-variable function.
– If you can guarantee that certain input combinations never occur
– If some outputs aren’t used in the rest of the circuit
 We mark don’t-care outputs in truth tables and K-maps with Xs.
x y z f(x,y,z)
0 0 0 0
0 0 1 1
0 1 0 X
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 X
1 1 1 1
 Don’t-care conditions can be used to help simplify Boolean expression further in K-
maps.
 Within a K-map, each X can be considered as either 0 or 1. You should pick the
interpretation that allows for the most simplification.
Don’t - Care Conditions
51  There are cases where our output doesn’t matter. In other words, there are
input combinations for which we don’t care what the output is
 You might wonder when such a case might occur. Crucial example is: An
odd parity generator for BCD code which has 6 unused combinations. But
also consider a seven-segment display (like in many alarm clocks, or the
class room wall clock)
 On this seven-segment display, we only wish to display the numbers 0 to 9.
– To represent the numbers 0 to 9, we need 4 bits: 0000 represents zero, 1001 represents nine,
and the other digits are similarly represented.
– But 4 bits can actually represent values from 0 to 15!
– So, when input bit values are from 10 to 15, we don’t care what the output is. (That is, we would
never expect the input to the circuit to have those values, so we don’t care what the circuit does
if it does happen).
 So, a circuit to control a seven-segment display would have 4 inputs (the
seven-segment display
binary number representation of the decimal number to be displayed) and 7
outputs (control signals to each of the 7 segments that tells them to light up
or turn off)

Lecture #4 Simplification of Boolean Functions


52 Don’t - Care Conditions
 Consider the topmost segment, labelled ‘a’.
– assume that a value of 1 activates the segment, and a value of 0 turns it off / leaves it unlit
– the top segment will be lit for values 0 , 2, 3, 5, 6 , 7, 8, 9
– we don’t care what it does if the values input happen to be in the range of 10 to 15

 In both the truth table and K-map, we represent a “don’t care” with an X. We draw
them on the K-map grid along with the 1's.
 Then, when forming groups on the K-map, we can treat the “don’t cares” (the X
cells) as 1's. This may often allow us to make larger groups, and thus reduce the
logic more.
 So, we can include “don’t cares” in groups, but we never have groups of just don’t
cares. Basically, we can treat them as 1's or 0's, whichever is most convenient.

Lecture #4 Simplification of Boolean Functions


53 Don’t - Care Conditions
 Truth table for output a of seven-segment display.

a = A + C + BD + B'D' e = CD' + B'D'


54 Don’t Care — Practice
 Find a MSP for:

f(w,x,y,z) = m(0,2,4,5,8,14,15), d(w,x,y,z) = m(7,10,13)

This notation means that input combinations wxyz = 0111, 1010 and 1101
(corresponding to minterms m7, m10 and m13) are unused.

Y
1 0 0 1
1 1 x 0
X
0 x 1 1
W
1 0 0 x
Z

Lecture #4 Simplification of Boolean Functions


55
Don’t Care — Solutions for Practice K-map
 Find a MSP for:
f(w,x,y,z) = m(0,2,4,5,8,14,15), d(w,x,y,z) = m(7,10,13)

f(w,x,y,z)= x'z' + wxy + w'xy'.

 All prime implicants are circled. We can treat X’s as 1s if we want, so the red group
includes two X’s, and the light blue group includes one X.
 The only essential prime implicant is x'z'. (An essential prime implicant is one that covers
a minterm that is covered by no other prime implicants.)
 The MSP is x'z' + wxy + w'xy'. It turns out some of the groups are redundant; we can
cover all of the minterms in the map without them.

Lecture #4 Simplification of Boolean Functions


56 K-map Summary
 K-maps are an alternative to algebra for simplifying expressions
 The result is a minimal sum of products (MSP)/ minimal product of sums (MPS), which
leads to a minimal two-level circuit
 It’s easy to handle don’t-care conditions
 K-maps are really only good for manual simplification of small expressions...
 Things to keep in mind:
 Remember the correct order of minterms/ maxterms on the K-map
 When grouping, you can wrap around all sides of the K-map, and your groups can
overlap
 Make as few rectangles as possible, but make each of them as large as possible. This
leads to fewer, but simpler, product terms
 There may be more than one valid solution

Lecture #4 Simplification of Boolean Functions

You might also like