You are on page 1of 14

 Minimization Technique for Boolean Expressions

 Karnaugh Map
 An alternative to the truth-table form for representing a function.
 Consider the two-variable example

 We can replace two minterms that differ in the value of only one
variable with a single product term that does not include that
variable at all (combining property 14a ).

 Minterms in any two cells that are adjacent, either in the same row
or the same column, can be combined.
1
 For example, the minterms m2 and m3 can be combined as

 Two-Variable Map
Consider a function

Truth table of a function

Its Karnaugh map:

2
 Cells of the bottom row:
 x2 = 1 and f = 1 regardless of whether x1 is equal to 0 or 1.
• The product term representing the two cells is simply x2

•Similarly, f = 1 for both cells in the first column. These cells


are identified by x1 = 0.
• The cells lead to the product term

 Therefore, the minimum-cost realization of the function is

3
Three-Variable Map
 A three-variable Karnaugh map is constructed by placing 2 two-variable maps
side by side.

 Valuation of x1 and x2
• Identifies a column in the map
 Value of x3
• Distinguishes the two rows
 The first and the fourth columns differ only in variable x1.

4 • These columns can be considered as being adjacent


Example 1: A function and its Karnaugh map is given by

Karnaugh map

Truth Table
 Product terms
The first covers the 1s in the top row
oRepresented by the term
 The second covers the 1s in the bottom row
o Represented by the term
 Hence, the function is implemented as

5
 Example 2: Realization of a group of four adjacent cells using a single
product term.
Consider the function given by the truth table.

The Karnaugh map becomes

 The four cells in the top row indicate that if x 3 = 0, then f = 1 for all four possible
valuations of x1 and x2.
o The product term represents these four cells.
 The remaining 1, corresponding to minterm m 5, is best covered by the term ,
obtained by combining the two cells in the right-most column.
6  Hence, The realization of f is
Summary of three variable map
 A product term must include only those variables that have the same value
for all cells in the group represented by this term. If the variable is equal to
1 in the group, it appears uncomplemented in the product term; if it is equal
to 0, it appears complemented. Each variable that is sometimes 1 and
sometimes 0 in the group does not appear in the product term.

7
Four-Variable Map
 Constructed by placing 2 three-variable maps together to create four rows.
 Four-variable map has the structure shown below.

 x1 = 1 for the two right-most columns


 x2 = 1 for the two middle columns
 x3 = 1 for the bottom two rows
 x4 = 1 for the two middle rows.

8
Consider the four variable function f1
• f1 has a group of four 1s in adjacent cells in the bottom two rows,
for which x2 = 0 and x3 = 1
• represented by the product term
• The two 1s in the second row are covered, with the term
The minimum-cost implementation

Similarly for the function f2 below

• The left and the right edges of the map are adjacent
in terms of the assignment of the variables, so are
the top and the bottom edges.
• The four corners of the map are
adjacent to each other.
 Implemented by the product term
• The remaining four 1s are covered as shown
in the figure.
• Hence,
9
Minimization of Product-of-Sums Forms
The maxterms for which f = 0 are combined into sum terms.
Consider the function given by the Karnaugh map

There are three maxterms that must be covered: M4, M5, and M6

• Leading to the implementation:

10
Similarly, for f2 given by the map

Seven maxterms must be covered.


 leading to the expression:

Incompletely Specified Functions


Don’t-care condition: Input condition that can never occur.
Incompletely specified function: A function that has don’t-care
condition(s).
The function value at don’t care can be assumed either 1 or 0,
11 whichever is useful for minimization.
Example 1: SOP implementation

• Using the shorthand notation, the function f


is expressed as

• where D is the set of don’t cares.


• The don’t cares D12, D13, and D14
(corresponding to m12, m13, and m14 ) are
assumed to have the value of 1 while D15 has
the value of 0.

• The resulting implementation is

12
Example 2: POS implementation

 The same values are assumed for the don’t


cares as for the SOP implementation
example.
 The result is

13
Exercise:
1) Find the minimum-cost SOP and POS forms for the
function

2) Find the minimum-cost SOP and POS forms for the


function

14

You might also like