Sei sulla pagina 1di 13

KARNAUGH MAP (K-MAP)

It originated from the map method proposed by Veitch also called


the Veitch Diagram and then modified by Karnaugh.
Developed by Karnaugh in 1953 that he presented in his paper entitled
The map method for synthesis of combinational logic circuit.
It is a pictorial form of a truth table and could handle up to 6
variables.
It is used to reduce or simplify a Boolean function.
It is an array of cells/squares in which each cell represents a binary
value of the input variables.
GENERALIZATION:
1) MAP SET-UP
The number of cell/square in a K-map is equal to 2n where n
is the number of input variables.
The map is drawn to show the relationship between squares
and input variables. Variables are assigned to row and
column. Binary marking are placed in each row and column
using reflected code sequence.
Each cell in the map represents a combination of input
variables in a given truth table.

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 1

# of Cells/group
1
2
4
8

# of Cells/group
1
2
4
8
16

# of inputs to represent the group


3
2
1
Grouping of 1s F = 1
Grouping of 0s F = 0

# of inputs to represent the group


4
3
2
1
Grouping of 1s F = 1
Grouping of 0s F = 0

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 2

# of Cells/group
1
2
4
8
16
32

# of inputs to represent the group


5
4
3
2
1
Grouping of 1s F = 1; Grouping of 0s F = 0

2) ADJACENCY RULE
Each cell in the K-map is positioned such that its neighboring cells
are adjacent to it. The cells in a Karnaugh map are arranged so that
there is only a single variable change between adjacent cells.
Adjacency is defined by a single-variable change. Cells that differ by
only one variable are adjacent. Cells with values that differ by more
than one variable are not adjacent.

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 3

3) MAPPING OF 0s AND 1s IN THE KARNAUGH MAP.


1s are placed in the squares of a K-map to represents minterms
of a Boolean function in canonical SOP (Sum-of-Minterm) form.
The number of 1s in the K-map is equal to the number of
product terms in the Boolean function. The cells that do not have
a 1 are the cells for which the expression is 0.

The 0s placed in the squares of a K-map represents the


maxterms of a Boolean function in canonical POS (Product of
Maxterm) form. The number of 0s in the K-map is equal to the
number of sum terms in the Boolean function. The cells that do
not have a 0 are the cells for which the expression is 1.
Example: F(A,B,C) = (A+B+C)(A+B+C)(A+B+C)(A+B+C)

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 4

A Boolean expression in standard (SOP or POS) form should be


converted first into its canonical (Sum of Minterm or Product of
Maxterm) expression before mapping the 1s (or 0s).

All 1s and 0s in the output column of the truth table can be


mapped directly onto a Karnaugh map into the cells
corresponding to the values of the associated input variable
combinations.
Example:

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 5

4) GROUPING OF 0s AND 1s
Group the 1s (or 0s) on the Karnaugh map according to the
rules given below. The objective is to maximize the number of elements
in a group and to minimize the number of groups.
(a) Always group adjacent cell containing 1s (or 0s) in powers of 2 {1, 2,
4, 8, 16, 32 or 64 1s (or 0s) in a group}. Start by combining the maximum
number of adjacent cell containing 1s (or 0s).
(b) Always include the largest possible number of 1s (or 0s) in a group in
accordance with rule (a) to reduce the number of literals in a term.
(c) Ensure that each 1s (or 0s) are covered when combining the squares.
The 1s (or 0s) already in a group can be included in another group as
long as the overlapping groups include noncommon 1s (or 0s).
(d)Minimize the number of groups to reduce the number of terms in the
simplified function. Avoid redundant grouping!
Example 1:

Example 2:

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 6

5) DETERMINATION OF SIMPLIFIED BOOLEAN FUNCTION


IN SOP AND POS FORM
In determining the simplified Boolean function in SOP form, the
following steps are done:
(a) Obtain a simplified product term for each group of cell
containing 1s by considering only variables that occur in
only one form (either uncomplemented or complemented)
within the group. Variables that occur both uncomplemented
and complemented within each group are eliminated.
(b) When the entire simplified product terms are derived from the
Karnaugh map, they are summed to form the simplified
Boolean function in SOP form.
Example 1:

Example 2:

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 7

In determining the simplified Boolean function in POS form, the


following steps are done:
(a) Obtain a simplified sum term for each group of cell
containing 0s by considering only variables that occur in
only one form (either uncomplemented or complemented)
within the group. Variables that occur both uncomplemented
and complemented within each group are eliminated.
(b) When all the simplified sum terms are derived from the
Karnaugh map, AND all the simplified sum terms to form the
simplified Boolean function in POS form.

F(A,B,C,D) = (A + B + C')(A' + B' + C +D)(A' + C' + D')

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 8

Example 3. Simplify the following Boolean functions using Karnaugh map:


(a) F (x,y,z) = (0,1,5,7)
Answer: F (x,y,z) = (x+y)(x+z)
(b) F (A,B,C) = (0,2,3,4,6)
Answer: F (A,B,C) = AB + C
(c) F (w,x,y,z) = (1,4,5,6,12,14,15)
Answer: F (w,x,y,z) = (xz+wyz+wxy)
(d) F (A,B,C,D) = (1,3,5,7,13,15)
Answer: F (A,B,C,D) = (A+D)(B+D)
(e) F (w,x,y,z) = wxy + yz + xyz + xy
Answer: F (w,x,y,z) = xz+xy+wy
(f) F(a,b,c) = (a + b) (a + b + c) (a + b)
Answer: F (a,b,c) = a(b+c)
Example 4. Given the truth table below, determine the following:
(a) Simplified Boolean function F in SOP and POS form using K-map.
(b) Simplified F in SOP form.
(c) Simplified F in POS form.
(d) Implement the Boolean function F using minimum number of logic
gates.
(e) Implement the Boolean function F using minimum number of logic
gates.
X
y
z
F
0
0
0
1
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
1
1
0
1
1
1
1
0
0
1
1
1
0
Answer:
(a)
F in POS form = y(x + z) {group 0s then obtain the simplified sum term for
each grouping and AND all sum terms}
F in SOP form = yz+ xy {group 1s then obtain the simplified product term for
each grouping and OR all product terms}
(b)
F in SOP form = y + xz
(c)
F in POS form = (x+y)(y+z)
(d)
Implement F in POS form using an OR gate and an AND gate
(e)
Implement F in SOP form using an AND gate and an OR gate
NOTES008 KARNAUGH MAP
DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 9

KARNAUGH MAP WITH DONT CARE CONDITIONS


Sometimes a situation arises in which some input variable
combinations are not allowed. For example, recall that in the BCD code,
there are six invalid combinations. For NBCD: 1010, 1011, 1100, 1101,
1110 and 1111. Since these unallowed states will never occur in an
application involving the BCD code, they can be treated as dont care
terms with respect to their effect on the output. That is, for these dont
care terms either a 1 or a 0 may be assigned to the output; it really does not
matter since they will never occur.
For each dont care term, an X is placed in the cell. The dont
care terms can be used as an advantage when simplifying because when
grouping the 1s (or 0s), the Xs can be treated as 1s (or 0s) to maximize the
number of elements in a group. Note that maximizing the number of element
per group would result to simpler product term (or sum term).
Example 5. Create a function that would give a 1 output only when NBCD
code for 7, 8 or 9 is present on the inputs.

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 10

Example 6. Determine the simplified Boolean functions using Karnaugh


map:
(a) F (A,B,C) = (0,1,2,4,5) ; d (A,B,C) = (3,6,7)
Answer: F (A,B,C) = 1
(b)

Answer: F (A,B,C,D,E) = D + BE
(c)

Answer: F (A,B,C,D,E) = B E
Example 7. Design a BCD to Excess-3 code converter circuit using
minimum number of logic gates. Use K-map in obtaining the simplified
Boolean function.
Solution:
Let: A,B,C,D = input variables representing 4-bit NBCD
w,x,y,z = output variables representing 4-bit Excess-3 code
NOTES008 KARNAUGH MAP
DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 11

Truth table:
Input
NBCD
A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1

B
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1

C
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1

D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

w
0
0
0
0
0
1
1
1
1
1
X
X
X
X
X
X

Output
Excess-3 code
x
Y
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
X
X
X
X
X
X
X
X
X
X
X
X

z
1
0
1
0
1
0
1
0
1
0
X
X
X
X
X
X

Using K-map,
w = A + BC +BD
x = BC + BD + BCD
y = CD + CD
z = D

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 12

DRILL PROBLEMS
1. A digital clock is to display the month of the year. Because the length of the
calendar varies, it is necessary to reset the day display at different points, depending
on the month. The calendar month is to be internally present as a 4-bit binary
number, that is January = 0001, February = 0010, March = 0011 and so on. As part
of the resetting circuit, it is necessary to detect all months having 31 days. Another
reset circuit is designed for months with less than 31 days. Design a minimal ORNAND circuit to implement the 31-days reset function. Design a minimal NANDAND circuit to implement the less than 31-days reset function.
2. Simplify the Boolean function together with the dont-care conditions.
(a) F(w,x,y,z) = (0,1,2,3,6,8,11) + d (5,7,10,15)
(b) F(A,B,C,D) = (3,4,12,14) + d (1,2,5,6,8,10,13,15)
3. Simplify the following Boolean functions using K-map and implement using
minimum number of logic gates:
(a) F = wz + xz + xy + wxz
(b) F(v,w,x,y,z) = (0,2,3,4,5,6,7,11,15,16,18,19,23,27,31)
(c) F (a,b,c,d) = (a+b+d)(a+b+c)(a+b+d)(b+c+d)

REFERENCES
[1] Thomas, Floyd L., Digital Fundamentals, 4th Edition, Macmillan Publishing
Company, New York, 1990
[2] Mano, M., Digital Design, 2nd Edition, Prentice Hall, N.J, 1991
[3] Swidlec Lecture Notes by Edzel Lapira, DLSU
[4] Tocci, R. and Widmer, N., Digital Systems: Principles and Applications, 8th
Edition, Prentice Hall Inc., N.J., 2001

NOTES008 KARNAUGH MAP


DIGITAL SYSTEM I LECTURE NOTES by Engr. Analene Montesines-Nagayo

page 13

Potrebbero piacerti anche