You are on page 1of 8

KARNAUGH MAPPING

Overview

Karnaugh Mapping (K-Mapping) is a methodology to simplify digital circuits into its least number
of gate implementation. Two basic information is necessary to understand the principle of K-Map
– the Sum of Product (SOP) or Minterm Notation that considers the values of variables with binary
1 and the Product of Sum (POS) or Maxterm Notation that considers the values of bits 0 for
variables.

When there is a diverse need of a certain logic designer in different situations, Karnaugh Map is
helpful enough to attain a simplified circuitry without sacrificing target outputs.

Karnaugh Map is like a map wherein sides are interconnected to each other as well as the top is
connected to the bottom of the map. But, be careful in using the K-Map as the methodology
implies one bit change from column to column and rows to rows.

Learning Objectives:

After successful completion of this lesson, you should be able to:


• Solve Karnaugh maps to minimize and optimize two-level functions up to 4 variables
• Implement design analysis through Karnaugh Maps

Course Material:

Sum of Product (Minterm) and Product of Sum (Maxterm) Notations

Boolean expression can be written in the sum-of-products form (SOP) or in the product-of-sums
form (POS). These forms can simplify the implementation of combinational logic. In both forms,
an overbar cannot extend over more than one variable.

A minterm of a function is a product of n literals (variables) in which each variable


appears once in either true or complemented form, but not both. An n variable
function has 2n valid terms.

Each row of a truth row corresponds to a single minterm. When a function is written as a sum
of minterms, the form is called a standard (or canonical) SOP.

Row x y z f Minterm
0 0 0 0 1 m 0 = x'y'z'
1 0 0 1 1 m1 = x'y'z
2 0 1 0 1 m 2 = x'yz'

54
3 0 1 1 0 m3 = x'yz
4 1 0 0 1 m4 = xy'z'
5 1 0 1 0 m5 = xy'z
6 1 1 0 0 m6 = xyz'
7 1 1 1 0 m 7 = xyz

Minterm Notation
An equation may be written in terms of m-notation
f (x,y,z) = m0 + m1 + m2 + m4
f (x,y,z) = m (0,1,2,4)

If it is possible to synthesize a function f by considering the truth table rows where f = 1, then it
should also be possible to synthesize f by considering the rows for which f = 0. This approach
uses the complement of minterms, called maxterms.

When a function is written as a product of maxterms, the form is called a standard (or canonical)
POS.

Row x y z f Minterm
0 0 0 0 1 M0 = x + y + z
1 0 0 1 1 M1 = x + y + z'
2 0 1 0 1 M 2 = x + y' + z
3 0 1 1 0 M3 = x + y' + z'
4 1 0 0 1 M 4 = x' + y + z
5 1 0 1 0 M5 = x' + y + z'
6 1 1 0 0 M 6 = x' + y' + z
7 1 1 1 0 M7 = x' + y' + z'

Maxterm Notation

An equation may be written in terms of M-notation


f (x,y,z) = M 3  M 5  M 6  M 7
f (x,y,z) = ΠM(3,5,6,7)

Karnaugh Mapping

The Karnaugh map (K-map) is a method of simplifying Boolean algebra expressions.

55
A Karnaugh map provides a pictorial method of grouping together expressions with common
factors and therefore eliminating unwanted variables.

The Karnaugh map can also be described as a special arrangement of a truth table.

BC
A 00 01 11 10

2 Variable K Map 3 Variable K Map

Presented are the different K-Map environments


being use depending on the number of variable AB CD
inputs.
Notice in the 3-Variable K-Map environment, the
change in variable inputs in the BC area are 00
to 01 to 11 to 10. In a normal binary situation, we
often make it as 00, 01, 10 and 11. This is
because the normal binary situation mentioned
pertains to the counting mechanisms as 0, 1, 2
and 3 which is not the mechanism in K-Map. 4 Variable K Map

The values of either 1 or 0 for each cell is adopted from a given truth table. The aim of K-Map is
eliminating variables that changes across column to a column or row to a row. Bear in mind of
what are you considering during the simplification process. If you consider outputs 1 to group,
then you are making an SOP while when 0 is considered and grouped, then you are making a
POS presentation.
It could be remembered in a Boolean expression that A + A’ = 1. In K-Map retain the variables
that did not change in state.
It could also be noted that there are numbers in each cells. These numbers correspond to the row
inputs.

Rules for Simplification using K-Map

1. Groups may not include any cell containing a zero

56
2. Groups may be horizontal or vertical, but not diagonal.

3. Groups must contain 1, 2, 4, 8, or in general 2n cells.

4. Each group should be as large as possible.

5. Each cell containing a one must be in at least one group.

57
6. Groups may overlap.

7. Groups may wrap around the table. The leftmost cell in a row may be grouped with the
rightmost cell and the top cell in a column may be grouped with the bottom cell.

8. There should be as few groups as possible, as long as this does not contradict any of the
previous rules.

58
Simplification Illustrations

Problem1

Problem 1 is a 3-variable K-Map problem. We had grouped two bits 1, this could mean that from
the truth table, only m0 and m4 have outputs 1 and the rest is 0. From the illustrative set in the
truth table, we could see that variables B and C is constant in values 0 while variable A changes
from either 0 and 1; thus being eliminated. As the grouping considers SOP, then the output
equation for the circuit is

𝐹 = 𝐵′ 𝐶′
Follow the same procedures for succeeding problems.

Problem 2

𝐹 = 𝐴𝐵′
Problem 3

𝐹 = 𝐶′

59
4 Variable K- Map Illustration

Don’t Care Conditions

The “Don’t Care” conditions allow us to replace the empty


cell of a K-Map to form a grouping of the variables. While
forming groups of cells, we can consider a “Don’t Care” cell
as either 1 or 0 or we can simply ignore that cell. Therefore,
“Don’t Care” condition can help us to form a larger group of
cells.

60
K-Mapping Problems

A corporation having 100 shares entitles the owner of each share to cast one vote at the share-
holders’ meeting. Assume that A has 60 shares, B has 30 shares, C has 20 shares and D has 10
shares. A two-third majority is required to pass a resolution in a share-holder’s meeting. Each of
these four men has a switch he closes to vote YES and opens to vote NO for his percentage of
shares. When the resolution passed, one output LED is ON. Derive a truth table for the output
function and give the simplified SOP equation for it.

Truth Table Karnaugh Map Simplification


CD
AB

1 1 1 1 AB

1 1

Output Equation AC

F = AB + AC = A (B + C)

Logic Gates Layout

A B C

Vcc

GND
IC Wiring Diagram
61

You might also like