COEN 3103 Lesson 5 - Boolean Function Simplification Part 2 - Karnaugh Map Method

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

COEN 3103 – Logic Circuits and Design

Lesson 5

by: Engr. Ricrey E. Marquez, PCpE


• In previous lesson, Boolean expressions
may be simplified by algebraic means
• However the procedure of minimization is
difficult.
• it lacks specific rules to predict each
succeeding step in the manipulating Boolean
terms in an expression.
• At the end of this lesson, you will be able to:
1. explain the advantages of semi-graphical method
over algebraic means of minimizing Boolean
expression or function,
2. simplify Boolean expression or function through n-
variable K-map method, and
3. simplify Boolean expression or function having don’t
care condition using K-map method.
PART 1
• Truth tables are a common means of describing the logical
relationships between Boolean inputs and outputs, however, it is not
always easy to convert that truth table directly into a Boolean
expression or function
• In this representation becomes more difficult as the number of
variables in a function increase.
• With this, a graphical means of translating a truth table into a logic
function was introduced by Maurice Karnaugh in the early 1953 and
today is called the Karnaugh map or K-map (Mano, M. & Celitti, M.,
2013).
• Adjacent cell is group of cells with values that differs by one variable.
• Cell is the smallest unit of a Karnaugh map, corresponding to one line of a truth
table. Where input variables are the cell’s coordinates, while input variable is the
cell’s contents.
• Dyads or Duads is a group of two (2) adjacent cells in a Karnaugh map and
cancels/removed one variable in a K-map simplification.
• Implicant is any grouping of 2n adjacencies.
• Karnaugh Map (K-Map) is a semi-graphical tool for finding the minimum SOP or
POS simplification of a Boolean expression. It works by arranging the terms of an
expression in such a way that variables can be canceled by grouping the
minterms (1’s) or maxterms (0’s) output functions.
• Maxterm. Any ORed term containing all the variables of a function in complemented or
uncomplemented form.
• Minterm. Any ANDed term containing all the variables of a function in complemented or
uncomplemented form.
• Monads is a single isolated minterms or maxterms.
• Octads is a group of eight (8) adjacent cells in a Karnaugh map and cancels/removed three (3)
variables in a K-map simplification.
• Product-ot-Sums (POS) is a Boolean expression in a form of ANDing of ORed terms, also called s-
terms (sum-terms).
• Quads is a group of four (4) adjacent cells in a Karnaugh map and cancels/removed (2) two
variables in a K-map simplification.
• Sum-of-Products (SOP) is a Boolean expression in a form of ORing of ANDed terms, also called
p-terms (product terms).
• Karnaugh Map (K-Map)
• graphical tool for simplifying Boolean expressions
• constructed with square or rectangle divided into smaller
squares called cells
• straightforward method for simplifying minterm or maxterm
outputs, where each K-map defines a unique Boolean
function
• minimization through pattern recognition for relatively simple
functions
• K-map provides visual aid in identifying prime
implicants (PIs) -- a groups of 2n minterms or maxterns
that cannot be combined with other 2n groups in any
way to produce terms of fewer variables.
• PIs has three subsets:
• Essential Prime Implicants (EPls)
• Optional Prime Implicants (OPIs)
• Redundant Prime Implicants (RPIs)
• K-map provides visual aid in identifying prime
implicants (PIs) -- a groups of 2n minterms or maxterns
that cannot be combined with other 2n groups in any
way to produce terms of fewer variables.
• PIs has three subsets:
• Essential Prime Implicants (EPls)
• Optional Prime Implicants (OPIs)
• Redundant Prime Implicants (RPIs)
• K-map is like a truth table, which provides a
representation of logic functions
• K-map composed of a certain number of squares or cells, each
of which is reserved for a term (minterm or maxterm) of a
Boolean function
• Each map representation in K-map, the combination of the
variables are placed in accordance with the order of Gray code
encoding
• 2nd Ordered K-map Representation
• For n = 2, it will generate 4 squares or cells, that is represented in 2 by
2 matrix orientation as illustrates in figure below.

a) Truth table of 2 variable inputs b) 2 by 2 map representation of truth table


• 3rd Ordered K-map Representation
• For n = 3, it will generate 8 squares or cells, that is represented in 2 by 4 matrix
orientation as illustrates in figure below.

a) Truth table of 3 variable inputs b) 2 by 4 map representation of truth table c) 4 by 2 map representation of truth table
• 4th Ordered K-map Representation
• For n = 4, it will generate 16 squares or cells, that is represented in 4 by 4 matrix orientation as
illustrates in figure below.

a) Truth table of 4 variable inputs b) 4 by 4 map representation of truth table


• 5th Ordered K-map Representation
• For n = 5, it will generate 32 squares or cells, that is represented in 4 by 8 matrix orientation as
illustrates in figure below.

a) Truth table of 5 variable inputs b) 4 by 8 map representation of truth table


• 6th Ordered K-map Representation
• For n = 6, it will generate 64 squares or cells, that is represented in 8 by 8 matrix orientation as
illustrates in figure below.

a) Truth table of 6 variable inputs b) 8 by 8 map representation of truth table


• Similar with Boolean algebra approach, K-map has also no particular
steps, but you can try these steps to determine the reduced sum-of-
products (SOP) or product-of-sums (POS) form for a given Boolean
expression or function using a Karnaugh map.
• It is necessary to:
1. Express the function in the form of the sum of its minterms or maxterms from the
truth table, Boolean function, or Boolean expression,
2. Place a 1 (or 0) in the proper cell for each minterm (or maxterm),
3. Cover all the 1s (or 0s) using a minimum number of the largest possible groups or
loops that involve 2n cells, n (input variables) being an integer starting from n to 0,
• Reduction Rule. Each variable within the area border crossed in an adjacent group
(looping) requires the absence (removed) of that variable in the reduced term
• Loop-out or group Rule. Loop out the largest 2n group of logically adjacent minterms
(group adjacent 1’s) or maxterms (group of adjacent 0’s) in increasing order from 2n, 2n-1,
2n-2 to 0.
4. Obtain the simplified expression for the Boolean expression function by summing
(or multiplying) the terms obtained for the different loops
• For simplified SOP, define product terms using variables common to all minterms in loop
or group, where:
• All binary 0’s coordinates = primed/complemented literal variable equivalent,
• All binary 1’s coordinates = unprimed/normal literal variable equivalent, or
• Other coordinates = remove or cancel literal variable in a product term.
• For simplified POS, define sum terms using variables common to all maxterms in loop or group,
where:
• All binary 0’s coordinates = unprimed/normal literal variable equivalent,
• All binary 1’s coordinates = primed/complement literal variable equivalent, or
• Other coordinates = remove or cancel literal variable in a sum term.
PART 2
• Example 1-24. Simplify the following Boolean functions.
1) L (xyz) = (3, 4, 6, 7)
2) O (pqr) = (0, 2, 4, 5, 6)
3) G (abcd) = (0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
4) I (wxyz) = (0, 5, 10, 11, 12, 13, 15)
5) C (abcde) = (3, 4, 6, 9, 11, 13, 15, 18, 25, 26, 27, 29, 31)
6) X (abcdef) = (0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 23, 32, 34, 36,
38, 40, 42, 44, 45, 46, 49, 51, 53, 54, 55, 57, 59, 60, 61, 62, 63)
L(xyz) = yz + xz’
O(pqr) = r(p’ + q)
G(abcd) = c’ + bd’
I(wxyz) = (w’ + x + y’)(w’ + y’ + z’)(w’ + x’ + y)(x’ + y + z’)(w + x + y + z)
C(abcde) = be + ac’de’ + a’c’de + a’b’ce’
X(abcdef) = b’f’ + abf + adef’ + acde’ + a’c’e’f’ + bc’def
• Example 1-25. Simplify the following Boolean
expressions using K-map method.
a) F (xyz) = (x + z’)(x + y’)(x’ + y’ + z’)(y’ + z’)
b) F (abcd) = a’b’c’ + b’cd’ + a’bcd’ + ab’c’
F(xyz) = (y’ + z’)(x + z’)(x + y’)
F(abcd) = b’c’ + b’d’ + a’cd’
PART 4
• Mano, M. and Celitti, M. (2013), in some applications, the function is
not specified for certain combinations of the variables.
• Functions that have unspecified outputs for some input combinations
are called incompletely specified functions.
• In most applications, we simply don’t care what value is assumed by
the function for the non-essential minterms or maxterms.
• Don’t-care conditions can be used on a map to provide further
simplification of the Boolean expression.
• Don’t-care minterm or maxterm is a combination of variables whose logical value
is not specified. In order to distinguish the don’t-care condition from 1’s and 0’s,
an X is used.
• An X inside a square in the map indicates that we don’t care whether the value of
0 or 1 is assigned to the output of the particular minterm or maxterm. A don’t care
minterms or maxterms list notation is denoted by a d or .
• Moreover, a don't cares can arise under the following two conditions:
a) When certain combinations of input logic variables can never occur, the output functions
for such combinations are nonessential and are assigned don't cares.
b) When all combinations of input logic variables occur but certain combinations of these
variables are irrelevant, the output functions for such combinations are assigned don't
cares.
• Don’t-care conditions could be used on a map method to provide
further simplified a Boolean expression or function through
maximizing the 2n group or loop of prime implicants (PIs).
• Each X can be assigned an arbitrary value of 0 or 1.
• X = 1 when a group or loop of adjacent 1’s is made (simplified SOP)
• X = 0 when a group or loop of adjacent 0’s is made (simplified POS)

• However, a don’t care output (X) may or may not combine in the
minimal cover or group process if all the 1’s or 0’s in a map is
already covered.
• Example 1-26. Simplify the following Boolean
functions.
a) F(wxyz) = (1, 3, 7, 11, 15) and (0, 2, 5)
b) F(abcde) = (3, 11, 12, 19, 23, 29) and (5, 7, 13,
27, 28)
F(wxyz) = cd + a’d
F(wxyz) = cd + a’b’
F(abcde) = (b’ + c’ + d)(c + d’ + e’)(b + d’ + e’)
• Example 1-27. If F(abcd) = a’b + cd is a simplified
Boolean expression of the expression abcd + a’b’cd +
a’b, determine the following:
a) Minterms list notation
b) Maxterms list notation
c) Don’t care list notation
• Determination of the row and column coordinates of
simplified Boolean expression F(abcd) = a’b + cd. Then,
plot it the map.
• Determine of the row and column coordinates of
unsimplified Boolean expression F(abcd) = abcd +
a’b’cd + a’b, and plot it also in a separate map.
• Comparing the map representation of the simplified Boolean
expression with the unsimplified expression. We can notice that
minterm output of cell 11 of unsimplified form the did not appear.
Hence, that cell is a candicate for don’t care output (X). Other
empty cells are considered maxterm outputs (0).
• Therefore, the minterms, maxterms, and don’t care lists
as follows:
PART 5
• Sometimes there are problems that we cannot form any
adjacent loops/groups 1’s or 0’s, due to the fact that all
minterms or maxterms are all prime implicants.
• In such case, we can apply the special case of loop or
group in map, resulting less gates.
• The XOR or XNOR loop or group can only be used when:
• The total count of 0’s (maxterm outputs) and 1’s (minterm
outputs) are equal,
• The no adjacent 1’s or 0’s can be found (all are prime
implicants (PI)), and
• No don’t care (X) entries.
• If all stated conditions are satisfied, we can used to XOR and XNOR loop
or group pattern. To start with, after plotting all the minterms or maxterms
in a map, then form a slant loop within the minterm outputs.
• For the middle operator (operator between row and column terms) can be
determined by the arrangement of slant adjacent group or loop in pair such
that:

a) XOR loop pattern, b) XNOR loop pattern in three 3rd ordered map
•Example 1-28. Determine the simplified
form of a Boolean function.
a) F(abc) = (0, 3, 5, 6)
b) F(wxyz) = (1, 2, 4, 7, 8, 11, 13, 14)
F(abc) = a  (b  c).
F(wxyz) = (w  x)(y  z)

You might also like