Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views15 pages

Digital Electronics Lesson 5

Karnaugh maps (Kmaps) are used to simplify Boolean expressions by grouping variables. This document discusses Kmaps for 2, 3, and 4 variables. For a 2-variable Kmap, cells are grouped if they are in the same row or column. For 3 and 4 variables, the cell ordering is modified to keep neighbors different in only 1 variable. Groups must contain powers of 2 cells and discard the differing variable. Don't care conditions can be treated as 0s or 1s to form larger groups during minimization. Examples demonstrate creating groups and simplifying Boolean expressions using Kmaps.

Uploaded by

akdauatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views15 pages

Digital Electronics Lesson 5

Karnaugh maps (Kmaps) are used to simplify Boolean expressions by grouping variables. This document discusses Kmaps for 2, 3, and 4 variables. For a 2-variable Kmap, cells are grouped if they are in the same row or column. For 3 and 4 variables, the cell ordering is modified to keep neighbors different in only 1 variable. Groups must contain powers of 2 cells and discard the differing variable. Don't care conditions can be treated as 0s or 1s to form larger groups during minimization. Examples demonstrate creating groups and simplifying Boolean expressions using Kmaps.

Uploaded by

akdauatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

6.

0 DESCRIPTION OF KMAPS AND TERMINOLOGY


NB: Karnaugh maps can be drawn for both Sum of product Boolean expressions or Product of Sums
Boolean expressions. We shall start base our discussion mainly on Sum of Product expressions which
uses minterms. But a few examples of Product of Sums Boolean expressions which uses maxterms are
also given. Karnaugh map can be drawn directly from either minterm (sum-of-products) or maxterm
(product-of-sums) Boolean expressions. Drawing a Karnaugh map from the truth table involves an
additional step of writing the minterm or maxterm expression depending upon whether it is desired to
have a minimized sum-of-products or a minimized product-of- sums expression. An n-variable Karnaugh
map has 2n squares, and each possible input is allotted a square.

1
A similar discussion applies for maxterm Karnaugh maps.

Figure 6.10 shows the truth table, minterm Karnaugh map and maxterm Karnaugh map of the
Boolean function of a two-input OR gate. The minterm and maxterm Boolean expressions for the two-
input OR gate are as follows:

2
3
How the simplification of Boolean Expressions is done using K-maps
A Kmap is a table with a cell for each minterm, which means it has a cell for each line of the truth table
for the function. Consider the function F(x,y) = xy and its truth table, as seen in Example 3A.1.

4
5
3A.3 KMAP SIMPLIFICATION FOR TWO VARIABLES
In the previous reduction for the function F(x,y), the goal was to group terms so we could factor out
variables. We added the xy to give us a term to combine with the . This allowed us to factor out the y,
leaving , which reduces to x+ y.
1. However, if we use Kmap simplification, we won’t have to worry about
which terms to add or which Boolean identity to use. The maps take care of that for us.
Let’s look at the Kmap for F(x,y) = x + y again in Figure 3A.3.
To use this map to reduce a Boolean function, we simply need to group ones. This grouping is very
similar to how we grouped terms when we reduced using Boolean identities, except we must follow
specific rules. First, we group only ones. Second, we can group ones in the Kmap if the ones are in the
same row or in the same column, but they cannot be on the diagonal (i.e., they must be adjacent cells).
Third, we can group ones if the total number in the group is a power of 2. The fourth rule specifies
we must make the groups as large as possible. As a fifth and final rule, all ones must be in a group (even
if some are in a group of one). Let’s examine some correct and incorrect groupings, as shown in Figures
3A.4 through 3A.7.
Notice in Figure 3A.6(b) and 3A.7(b) that one 1 belongs to two groups. This is the map equivalent of
adding the term xy to the Boolean function, as we did when we were performing simplification using
identities. The xy term in the map will be used twice in the simplification procedure.
To simplify using Kmaps, first create the groups as specified by the rules above. After you have found all
groups, examine each group and discard the variable that differs within each group. For example, Figure
3A.7(b) shows the correct grouping for F(x,y) = x + y. Let’s begin with the group represented by the
second row (where x = 1). The two minterms are x ̅ and xy. This group represents the logical OR of these
two terms, x ̅ and xy. These terms differ in y, so y is discarded, leaving only x. (We can see that if we use
Boolean identities, this would reduce to the same value. The Kmap allows us to take a shortcut, helping
us to automatically discard the correct variable.) The second group represents . These differ in x,
so x is discarded, leaving y. If we OR the results of the first group and the second group, we have x + y,
which is the correct reduction of the original function, F.

6
3A.4 KMAP SIMPLIFICATION FOR THREE VARIABLES
Kmaps can be applied to expressions of more than two variables. In this focus section, we show three
variable and four-variable Kmaps. These can be extended for situations have five or more variables. You
already know how to set up Kmaps for expressions involving two variables. We simply extend this idea
to three variables, as indicated by Figure 3A.8. The first difference you should notice is that two
variables, y and z, are grouped together in the table. The second difference is that the numbering for the
columns is not sequential. Instead of labeling the columns as 00, 01, 10, 11 (a normal binary progression),
we have labeled them 00, 01, 11, 10. The input values for the Kmap must be ordered so that each minterm
differs in only one variable from each neighbor. By using this order (for example 01 followed by 11), the

7
8
The end result using Boolean identities is exactly the same as the result using map simplification. From
time to time, the grouping process can be a little tricky. Let’s look at an example that requires more
scrutiny.

9
3A.5 KMAP SIMPLIFICATION FOR FOUR VARIABLES
We now extend the map simplification techniques to four variables. Four variables give us 16 minterms,
as shown in Figure 3A.9. Notice the special order of 11 followed by 10 applies for the rows as well as the
columns. Example 3A.6 illustrates the representation and simplification of a function with four variables.
We are only concerned with the terms that are 1s, so we omit entering the 0s into the map.
F(w,x,y,z)= ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

Occasionally, there are choices to make when performing map simplification.


Consider Example 3A.7.

10
The the rules for Kmap simplification can be summarized as follows:
1. The groups can only contain 1s; no 0s.
2. Only 1s in adjacent cells can be grouped; diagonal grouping is not allowed.
3. The number of 1s in a group must be a power of 2.
4. The groups must be as large as possible while still following all rules.
5. All 1s must belong to a group, even if it is a group of one.
6. Overlapping groups are allowed.
7. Wrap around is allowed.
8. Use the fewest number of groups possible.

11
Using these rules, let’s complete one more example for a four-variable function. Example 3A.8 shows
several applications of the various rules.

12
EXAMPLE 3A.10
Figs 6.13(a) and (b) respectively show minterm and maxterm Karnaugh maps for the Boolean functions
expressed by equations (6.50) and (6.51). The minimized expressions as deduced from Karnaugh maps in
the two cases are given by Equation (6.52) in the case of the minterm Karnaugh map and Equation (6.53)
in the case of the maxterm Karnaugh map:

13
Figure 6.13

3A.6 DON’T CARE CONDITIONS


There are certain situations where a function may not be completely specified, meaning there may be
some inputs that are undefined for the function. For example, consider a function with 4 inputs that act as
bits to count, in binary, from 0 to 10 (decimal). We use the bit combinations 0000, 0001, 0010, 0011,
0100, 0101, 0110, 0111, 1000, 1001, and 1010. However, we do not use the combinations 1011, 1100,
1101, 1110, and 1111. These latter inputs would be invalid, which means if we look at the truth table,
these values wouldn’t be either 0 or 1. They should not be in the truth table at all. We can use these don’t
care inputs to our advantage when simplifying Kmaps. Because they are input values that should not
matter (and should never occur), we can let them have values of either 0 or 1, depending on which helps
us the most. The basic idea is to set these don’t care values in such a way that they either contribute to
make a larger group, or they don’t contribute at all. Example 3A.10 illustrates this concept.
EXAMPLE 3A.10 Don’t Care Conditions
Don’t care values are typically indicated with an “X” in the appropriate cell. The following Kmap shows
how to use these values to help with minimization. We treat the don’t care values in the first row as 1s to
help form a group of four. The don’t care values in rows 01 and 11 are treated as 0s. This reduces to

14
15

You might also like