Simplification of Boolean Functions:: The Karnaugh Map (K Map) Method Introduction

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

Simplification of Boolean Functions:

The Karnaugh map (K map) method introduction:


 Simplification of Boolean function is very important, since it directly affects the
complexity of logic gates/digital design.
 Although the truth table representation of a function is unique, expressed algebraically,
it can appear in many different forms: complex as well as simple.
 Boolean functions may be simplified by algebraic, however, this procedure of
minimization lacks specific rules to predict each succeeding step in the manipulative
process.
 The map method (Karnaugh map) provides a simple procedure for minimizing Boolean
functions.
 This method may be regarded as a pictorial form of a truth table.

Karnaugh map (K map) structure:


 The map is a diagram made up of squares. Each square represents one minterm.
 Since any Boolean function can be expressed as a sum of minterms, it follows that a
Boolean function is recognized graphically in the map from the area enclosed by those
squares whose minterms are included in the function.

Two- Variable K-maps:--


 There are four minterms for two variables; hence, the map consists of four squares,
one for each minterm.
 The 0's and 1's marked for each row and each column designate the values of variables
x and y, respectively.

 Variable ‘x’ appears primed in row 0 and unprimed in row 1. Similarly, ‘y’ appears
primed in column 0 and unprimed in column 1.
e.g., F(x,y) = xy = m3 F(x,y) = x + y = 𝑥 ′ 𝑦 + 𝑥𝑦 ′ + 𝑥𝑦 = 𝑚1 + 𝑚2 + 𝑚3
Three-Variable K-maps :--
 There are eight minterms for three binary variables. Therefore, a map consists of
eight squares.
 Note that the minterms are not arranged in a binary sequence, but in a sequence
similar to the Gray code.
 The characteristic of this sequence is that only one bit changes from 1 to 0 or from 0 to
1 in the listing sequence.

Explanation of individual squares:--


The square assigned to m5, corresponds to row 1 and column 01. When these two numbers
are concatenated, they give the binary number 101, whose decimal equivalent is 5.
Another way of looking at square m5 = xy'z is to consider it to be in the row marked x and the
column belonging to y'z (column 01).
The usefulness of the map for simplifying Boolean functions:--
The basic property possessed by adjacent squares 
Any two adjacent squares in the map differ by only one variable (which is primed in one
square and unprimed in the other).
For example, m5 and m7 lie in two adjacent squares. Variable y is primed in m5 (= 𝑥𝑦 ′ 𝑧) and
unprimed in m7 (= 𝑥𝑦𝑧), whereas the other two variables (x and z) are the same in both
squares.
Hence, using Boolean algebra, the sum of two minterms in adjacent squares (m5 and m7) can
be simplified to a single AND term consisting of only two literals (x and z) as shown below:
𝑚5 + 𝑚7 = 𝑥𝑦 ′ 𝑧 + 𝑥𝑦𝑧 = 𝑥𝑧(𝑦 ′ + 𝑦) = 𝑥𝑧
Thus, any two minterms in adjacent squares that are ORed together will cause a removal
of the different variable.
Karnaugh Maps - Rules of Simplification:--
1) Groups may not include any cell containing a zero.
2) Groups may be horizontal or vertical, but not diagonal.
A A

3) Groups must contain 1, 2, 4, 8, or in general 2n cells. That is if n = 1, a group will


contain two 1's since 21 = 2. If n = 2, a group will contain four 1's since 22 = 4.
4) Each cell containing a 1 must be in at least one group.
5) Groups may overlap.

6) 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.

7) Each group should be as large as possible.


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

Example 1:--

Simplify the Boolean function: 𝐹(𝑥, 𝑦, 𝑧) = Σ(2, 3, 4, 5)


Solution:
𝑥 ′ 𝑦𝑧 + 𝑥 ′ 𝑦𝑧 ′ = 𝒙′ 𝒚

𝑥𝑦 ′ 𝑧 ′ + 𝑥𝑦 ′ 𝑧 = 𝒙𝒚′
Step-1: First, a 1 is marked in each minterm that is present in the function, e.g., the squares for
minterms 010, 011, 100, and 101 are marked with 1’s.
Step-2: Find possible adjacent squares. These are indicated in the map by two rectangles, each
enclosing two 1's.
Step-3: The upper right rectangle represents the area enclosed by x'y. This is determined by
observing that the two-square area is in row 0, corresponding to x', and the last two columns,
corresponding to y.
Similarly, the lower left rectangle represents the product term xy'.
Step-4: The logical sum of these two product terms gives the simplified expression.
F = x'y + xy'
Example 2:--

Simplify the Boolean function: 𝐹(𝑥, 𝑦, 𝑧) = 𝑥 ′ 𝑦𝑧 + 𝑥𝑦 ′ 𝑧 ′ + 𝑥𝑦𝑧 + 𝑥𝑦𝑧′.


Solution: yz
y

𝑥 ′ 𝑦𝑧 + 𝑥𝑦𝑧 = 𝒚𝒛

𝑥𝑦 ′ 𝑧 ′ + 𝑥𝑦𝑧 ′ = 𝒙𝒛′
x

z
 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 becomes: F = yz + xz' .

Combination of four adjacent squares in the three-variable map:-

Such combination represents the logical sum of four minterms and results in an expression of
only one literal.
As an example, the logical sum of the four adjacent minterms 1, 3, 5, and 7 (i.e. m1, m3, m5
m7) reduces to a single literal term z.
𝒛

z
m1+ m3+ m5 + m7 = 𝑥 ′ 𝑦 ′ 𝑧 + 𝑥 ′ 𝑦𝑧 + 𝑥𝑦 ′ 𝑧 + 𝑥𝑦𝑧

= x'z(y' + y) + xz(y' + y)
= x'z + xz = z(x' + x) = z
NOTE: The number of adjacent squares that may be combined must always represent
a number that is a power of two such as 1, 2, 4, and 8.
For a three-variable K map representation:--
 One square represents one minterm, giving a term of three literals.
 Two adjacent squares represent a term of two literals.
 Four adjacent squares represent a term of one literal.
 Eight adjacent squares encompass the entire map and produce a function that is always
equal to 1.

Four-Variable K-maps:--
 There are 16 minterms for 4 binary variables. Therefore, a map consists of 16 squares.
 In fig. (a) are listed the 16 minterms and the squares assigned to each.
 In fig. (b) the map is redrawn to show the relationship with the four variables.
 The rows and columns are numbered in a reflected-code (Gray code) sequence, with
only one digit changing value between two adjacent rows or columns.
 The minterm corresponding to each square can be obtained from the concatenation of the
row number with the column number.
 For example, the numbers of the third row (11) and the second column (01), when
concatenated, give the binary number 1101, the binary equivalent of decimal 13. Thus,
the square in the third row and second column represents minterm m13.
Adjacent
squares

Adjacent
squares
 Adjacent squares => squares next to each other.
 The map is considered to lie on a surface with the top and bottom edges, as well as the
right and left edges, touching each other to form adjacent squares.
 For example, m0 and m2 form adjacent squares, as do m3, and m11.

Group of adjacent square/squares:

 One square represents one minterm, giving a term of four literals (variables).
 Two adjacent squares represent a term of three literals.
 Four adjacent squares represent a term of two literals.
 Eight adjacent squares represent a term of one literal.
 Sixteen adjacent squares represent the function equal to 1.

Reference: Digital Design by M Morris Mano, M D Ciletti, 5th edition, Pearson publication.

You might also like