0% found this document useful (0 votes)
46 views80 pages

04 Karnaugh Maps

The document discusses Karnaugh maps, which provide a systematic way to minimize Boolean functions. Karnaugh maps depict a truth table pictorially and take advantage of simplifying adjacent minterms that differ in only one variable. This allows for easier minimization compared to algebraic methods, which can lack specific rules. Karnaugh maps also make it easier to determine when a solution is already minimal.

Uploaded by

Dann Laurte
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)
46 views80 pages

04 Karnaugh Maps

The document discusses Karnaugh maps, which provide a systematic way to minimize Boolean functions. Karnaugh maps depict a truth table pictorially and take advantage of simplifying adjacent minterms that differ in only one variable. This allows for easier minimization compared to algebraic methods, which can lack specific rules. Karnaugh maps also make it easier to determine when a solution is already minimal.

Uploaded by

Dann Laurte
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/ 80

KARNAUGH MAPS

SCHOOL OF COMPUTING RIEL A. GOMEZ


REVIEW OF MINTERMS AND SOP EXPRESSIONS

• Each row of a truth table can be inputs


minterm symbol
associated with a minterm. A B C D
0 0 0 0 ഥB
A തD
ഥC ഥ m0
0 0 0 1 ഥB
A തD
ഥC m1
• The minterm of a particular row 0 0 1 0 ഥB
A ഥCDഥ m2
has the property that it is equal to 0 0 1 1 ഥB
A ഥCD m3
1 on the values of the input 0 1 0 0 ഥ BC
A തDഥ m4
variables for that row. 0 1 0 1 ഥ BC
A തD m5
0 1 1 0 ഥ BCD
A ഥ m6
ഥ BCD m7
• Each minterm is assigned a 0 1 1 1 A
1 0 0 0 AB തD
ഥC ഥ m8
symbol, mi, where the subscript i
on the minterm is the number of 1 0 0 1 AB തD
ഥC m9
1 0 1 0 ABഥCDഥ m10
the row on which it equals 1 (the
1 0 1 1 ABഥCD m11
row numbers are obtained by m12
1 1 0 0 ABCതDഥ
reading the values of the variables
1 1 0 1 ABCതD m13
on that row as a binary number). m14
1 1 1 0 ABCD ഥ
1 1 1 1 ABCD m15

Karnaugh Maps
REVIEW OF MINTERMS AND SOP EXPRESSIONS

• Derive the simplified logic expression and draw the logic circuit for the following truth tables
using the SOP Method.

INPUTS OUTPUT
A B C D Z
0 0 0 0 0
0 0 0 1 0
Z = ෍(2, 3, 4, 6, 7, 8, 9, 10, 11)
0 0 1 0 1 m2
0 0 1 1 1 m3
0 1 0 0 1 m4
0 1 0 1 0
Z
0 1 1 0 1 m6
0 1 1 1 1 m7
= m2 + m3 + m4 + m6 + m7 + m8 + m9 + m10
1 0 0 0 1 m8 + m11
1 0 0 1 1 m9
1 0 1 0 1 m10
1 0 1 1 1 m11 Z
1 1 0 0 0 =AഥB
ഥ CDഥ+A ഥB ഥ Cത D
ഥCD + AB ഥ D
ഥ + ABC ഥ
ഥ + ABCD
1 1 0 1 0 ഥCത D
+ AB ഥ + AB ത + AB
ഥCD ഥ CDഥ + AB
ഥCD
1 1 1 0 0
1 1 1 1 0

Karnaugh Maps
REVIEW OF MINTERMS AND SOP EXPRESSIONS
A B C D

• Logic Circuit for:

Z
=AഥB
ഥCD ഥ+A ഥB ഥBCത D
ഥCD + A ഥ
Z
+AഥBCD ഥ+A ഥBCD + AB
ഥCത D

ഥCത D + AB
+ AB ഥCD
ഥ + AB
ഥCD

Karnaugh Maps
REVIEW OF MINTERMS AND SOP EXPRESSIONS

• Simplifying the SOM expression to get its SOP form:


ഥB
Z=A ഥ CD ഥB
ഥ+A ഥ BCത D
ഥCD + A ഥ BCD
ഥ+A ഥBCD + AB
ഥ+A ഥCത D ഥCത D + AB
ഥ + AB ഥ CD
ഥ + AB
ഥCD

ഥB
=A ഥ CD ഥB
ഥ+A ഥ BCത D
ഥCD + A ഥBCD
ഥ+A ഥBCD + AB
ഥ+A ഥCത D ഥCത D + AB
ഥ + AB ഥ CD
ഥ + AB
ഥCD

ഥB
=A ഥ CD ഥB
ഥ+A ഥ BCത D
ഥCD + A ഥ BCD
ഥ+A ഥ BCD
ഥ+A ഥBCD + AB
ഥ+A ഥCത D ഥCത D + AB
ഥ + AB ഥ CD
ഥ + AB
ഥCD

ഥB
=A ഥC(D ഥ BD
ഥ + D) + A ഥ (Cത + C) + A
ഥ BC(D ഥCത (D
ഥ + D) + AB ഥ + D) + AB
ഥC(D
ഥ + D)

ഥB
=A ഥ BD
ഥC + A ഥBC + AB
ഥ+A ഥCത + AB
ഥC ഥB
=A ഥ BD
ഥC + A ഥBC + AB
ഥ+A ഥCത + AB
ഥC

ഥB
=A ഥBC + A
ഥC + A ഥ BD ഥCത + AB
ഥ + AB ഥC

ഥC(B
=A ഥ BD
ഥ + B) + A ഥ(Cത + C)
ഥ + AB

ഥC + A
=A ഥ BD
ഥ + AB

Karnaugh Maps
REVIEW OF MINTERMS AND SOP EXPRESSIONS

A B C D

• Logic Circuit for:

ഥC + A
Z=A ഥ BD
ഥ + AB
ഥ Z

Karnaugh Maps
KARNAUGH MAPS

• The complexity of the digital logic gates that implement a Boolean function is
directly related to the complexity of the algebraic expression from which the
function is implemented.

• Boolean expressions may be simplified by algebraic means as shown in previous


discussions.

• However, this procedure of minimization is awkward because it lacks specific


rules to predict each succeeding step in the manipulative process (difficult to
apply in a systematic way).

• It is also difficult to tell when the solution is already minimal.

• The Karnaugh Map or K-Map method provides a simple, straightforward


procedure for minimizing Boolean functions. This method may be regarded as a
pictorial form of a truth table.

Karnaugh Maps
KARNAUGH MAPS

• The complexity of the digital logic gates that implement a Boolean


function is directly related to the complexity of the algebraic
expression from which the function is implemented.

• Boolean expressions may be simplified by algebraic means as


shown in previous discussions.

• However, this procedure of minimization is awkward because it


lacks specific rules to predict each succeeding step in the
manipulative process. In other words, difficult to apply in a
systematic way).

• It is also difficult to tell when the solution is already minimal.

Karnaugh Maps
KARNAUGH MAPS

• The Karnaugh Map


or K-Map method
provides a simple,
straightforward
procedure for
minimizing Boolean
functions.

• This method may be


regarded as a
pictorial form of a
truth table.

Karnaugh Maps
KARNAUGH MAPS

• K-maps take advantage of the principle that adjacent minterms (terms that
differ in only one variable) facilitate the simplification process.

Examples:

Z = ABCD + ABCDഥ ഥ + ABCത D


Z = ABCD + ABCD ഥ
ഥ)
= ABC(D + D ഥ + ABCത D
= ABCD + ABCD ഥ + ABCD

= ABC = ABC(D + D ഥ (Cത + C)
ഥ ) + ABD
= ABC + ABDഥ

Z = ABCD + ABCD ഥ + ABCത D ത


ഥ + ABCD
ഥ ) + ABCത (D
= ABC(D + D ഥ + D)
= ABC + ABCത

= AB(C + C)
= AB

Karnaugh Maps
KARNAUGH MAPS

• Take note that in adjacent minterms, the variable in


which the terms differ is the one that is removed.

Example:


Z = ABCD + ABCD

ഥ)
= ABC(D + D

= ABC

Karnaugh Maps
KARNAUGH MAPS

• The K-Map may be regarded as


a pictorial form of a truth table.

• It is a diagram made up of
squares (called cells), with each
square representing one
minterm of the function that is
to be minimized.

• It is really just another way of


presenting a truth table, but the
mode of presentation gives
more insight.

Karnaugh Maps
KARNAUGH MAPS

INPUTS OUTPUT
A B C D Z
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1

Karnaugh Maps
KARNAUGH MAPS

• The cells are arranged such that


adjacent cells are assigned to
adjacent minterms.

• The Boolean expression is


minimized by recognizing
various patterns in the K-map.

• The simplest recognizable


patterns lead to either a sum-
of-product terms (SOP)
expression or a product-of-sum
terms (POS) expression with a
minimum number of literals
(variables).
ABCത D ABCD

Karnaugh Maps
2-VARIABLE MAP

• As discussed previously, there are four minterms for two variables.

• In a 2-variable map, each minterm is associated with a cell identified by the


intersection of the values of A and B.

• The K-map of an expression is obtained by filling up the map with the values
corresponding to each input combination.

B
A B minterm symbol
A 0 1
0 0 ഥB
A ഥ m0
0 1 ഥ
AB m1 0 m0 m1
1 0 ഥ
AB m2
1 m2 m3
1 1 AB m3

Karnaugh Maps
2-VARIABLE MAP

• Example:

inputs output B
A B Z A 0 1
0 0 0 0 0 0
0 1 0
1 0 1 1 1 1
1 1 1

Z = m2 + m3
ഥ + AB
Z = AB

Karnaugh Maps
3-VARIABLE MAP
Take note that the columns are labelled in reflected
order and not in binary progression. This is to
A B C minterm symbol maintain the property that adjacent minterms occupy
adjacent cells.
0 0 0 ഥB
A ഥCത m0
It should also be noted that both ends are adjacent to
0 0 1 ഥB
A ഥC m1 each other.

0 1 0 ഥ BCത
A m2
BC
0 1 1 ഥ
ABC m3
A 00 01 11 10
1 0 0 ഥCത
AB m4

1 0 1 ഥC
AB m5
0 m0 m1 m3 m2
1 1 0 ABCത m6
1 m4 m5 m7 m6
1 1 1 ABC m7

Karnaugh Maps
3-VARIABLE MAP

• Example:

inputs output Z = m1 + m2 + m5 + m7
A B C Z
ഥB
Z=A ഥBCത + AB
ഥC + A ഥC + ABC
0 0 0 0
0 0 1 1
0 1 0 1 BC
0 1 1 0 A 00 01 11 10
1 0 0 0 0 0 1 0 1
1 0 1 1
1 1 0 0 1 0 1 1 0
1 1 1 1

Karnaugh Maps
4-VARIABLE MAP

CD
AB 00 01 11 10

00 m0 m1 m3 m2
Both the columns
and the rows are 01 m4 m5 m7 m6
labelled in
reflected order. 11 m12 m13 m15 m14

10 m8 m9 m11 m10

Karnaugh Maps
4-VARIABLE MAP

• Example:
Z = m2 + m3 + m6 + m7 + m8 + m9 + m10 + m11
input output
A B C D Z ഥB
Z=A ഥCD ഥB
ഥ+A ഥ BCD
ഥCD + A ഥ+A ഥ BC + AB
ഥCതD ഥCത D
ഥ + AB
0 0 0 0 0 ഥCD
+ AB ഥ + AB
ഥCD
0 0 0 1 0
0 0 1 0 1 CD
0 0 1 1 1 AB 00 01 11 10
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
00 0 0 1 1
0 1 1 1 1
1
1
0
0
0
0
0
1
1
1
01 0 0 1 1
1 0 1 0 1
1 0 1 1 1 11 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0 10 1 1 1 1
1 1 1 1 0

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Consider the general 3-variable K-map below:

Note that there are four



B B squares in which each
BC variable is equal to 1. The
variable appears
A 00 01 11 10 uncomplemented for these
ഥ squares.
A 0 m0 m1 m3 m2
There are also four squares
A 1 m4 m5 m7 m6 in which each variable is
equal to 0. The variable
appears complemented for
these squares.
Cത C Cത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• To understand the usefulness of the map in simplifying Boolean functions, it


should be noted again that adjacent squares (horizontally or vertically, but not
diagonally) in the map represent adjacent minterms.

Examples:

BC m0 and m1 are adjacent


A 00 01 11 10 ഥB
A ഥCത ഥB
A ഥC

0 m0 m1 m3 m2 m3 and m7 are adjacent


ഥ BC
A ABC
1 m4 m5 m7 m6
m4 and m6 are adjacent
ഥCത
AB ABCത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Consider the following K-map.

The two 1s represent two minterms that are adjacent to one another, 𝐴ABC ത and
𝐵𝐶
𝐴𝐵𝐶
ABC. They differ in variable B which will be removed if the sum of the two
minterms are formed.

ഥC + ABC
Z = AB
BC ഥ + B)
= AC(B
A 00 01 11 10 = AC

0 0 0 0 0
Thus any two minterms
in adjacent squares that
1 0 1 1 0 are ORed together will
cause a removal of the
dissimilar variable.

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 1:

Simplify the expression: Z = ෍(2, 3, 4, 5)

BC
A 00 01 11 10
The adjacent squares are:
0 0 0 1 1
m2 and m3
1 1 1 0 0 m4 and m5

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 1:

Simplify the expression: Z = ෍(2, 3, 4, 5)


B B
BC
This rectangle represents the
A 00 01 11 10 area enclosed by 𝐴𝐵ҧ
AB.


A 0 0 0 1 1 This is determined by observing
that the two-square area is in

row 0, corresponding to A
A, and
the last two columns
A 1 1 1 0 0 corresponding to 𝐵B.

Cത C Cത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 1:

Simplify the expression: Z = ෍(2, 3, 4, 5)


B B
BC
A 00 01 11 10


A 0 0 0 1 1 Similarly, this rectangle
represents the product term 𝐴 𝐵ത
AB.
A 1 1 1 0 0 The second row represents 𝐴
A
and the two left columns

represent 𝐵
B.
Cത C Cത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 1:

Simplify the expression: Z = ෍(2, 3, 4, 5)


B B ഥB
A
BC
A 00 01 11 10

ഥ The logical sum of these


A 0 0 0 1 1 two product terms gives the
simplified expression:

A 1 1 1 0 0 ഥ B + AB
Z=A ഥ


AB
Cത C Cത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 2:

Simplify the expression: Z = ෍(3, 4, 6, 7)

The adjacent squares are:


BC
BC m3 and m7
A 00 01 11 10
m4 and m6
0 0 0 1 0
The logical sum of these
1 1 0 1 1 two product terms gives the
simplified expression:

ACത Z = BC + ACത

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 3:

Simplify the expression: Z = ෍(2, 3, 6, 7)

The adjacent squares are:


ഥB
A
BC m2 and m3
A 00 01 11 10
m6 and m7
0 0 0 1 1
The logical sum of these
1 0 0 1 1 two product terms gives the
simplified expression:

ഥ B + AB
Z=A
AB

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 3:

Simplify the expression: Z = ෍(2, 3, 6, 7)

However, the expression


ഥB
A obtained is not the simplest one.
BC It can still be further simplified:
A 00 01 11 10
ഥ B + AB
Z=A
0 0 0 1 1 ഥ + A)
= B(A

1 0 0 1 1 =B

AB

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 3:

Simplify the expression: Z = ෍(2, 3, 6, 7)

BC Instead of grouping m2 and m3


and then m6 and m7, the four
A 00 01 11 10 minterms should have been
grouped together since they are
adjacent to one another.
0 0 0 1 1
The simplified expression is
1 0 0 1 1 therefore:

Z=B

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)
• 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.

• As more adjacent squares are combined, a product term


with fewer literals is obtained.

– One square represents one minterm, giving a term with


three literals.
– Two adjacent squares represent a term with two
literals.
– Four adjacent squares represent a term with one literal.
– Eight adjacent squares encompass the entire map and
produce a function that is always equal 1.
Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Rules in Grouping of 1s:

– Groups may be vertical or horizontal but not diagonal.


– The number of 1s in a group should be a power of 2 (1,
2, 4, 8, etc.).
– The shape of a group should be regular (square or
rectangular).
– Groups should be as large as possible thereby
minimizing the total number of groups.
– Every 1 in the map must be a member of a group.
– A 1 can be a member of several groups (overlapping).
However, each group should have at least one member
that is not member of another group.

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Prime Implicants and Essential Prime Implicants

➢ Implicant – any group of equal valued cells (1's


or 0's).

➢ Prime Implicant – any implicant which cannot


be a part of another (largest).

➢ Essential Prime Implicant – a prime implicant


with at least one member that is not a member
of any other prime implicant.

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

CD CD
AB 00 01 11 10 AB 00 01 11 10

00 0 0 0 1 00 0 0 0 1

01 0 0 1 1 01 0 0 1 1

11 0 1 1 0 11 0 1 1 0

10 0 1 0 0 10 0 1 0 0

Essential
Prime Implicants
Prime Implicants

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Example 4:

Simplify the expression: Z = ෍(0, 2, 4, 5, 6)

The adjacent squares are:


Cത
BC m4 and m5
A 00 01 11 10
m0, m2, m6, and m4
0 1 0 0 1
The logical sum of these
1 1 1 0 1 two product terms gives the
simplified expression:


AB ഥ + Cത
Z = AB

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• More Examples in Groupings

BC BC
A 00 01 11 10 A 00 01 11 10

0 1 1 1 1 0 1 0 0 1

1 0 1 1 0 1 1 1 0 0

BC BC
A 00 01 11 10 A 00 01 11 10

0 1 1 1 0 0 1 0 1 0

1 0 1 0 0 1 0 1 0 0

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Exercises: Simplify the following Boolean expressions using


3-variable maps.

Z = ෍(0, 2, 6, 7)

Z = ෍(0, 1, 2, 3, 7)

Z = ෍(0, 2, 3, 4, 6)

Z = ෍(0, 5, 6, 7)

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• If a function is not expressed in the sum-of-minterms form,


it is possible to use the map to obtain the minterms of the
function and then simplify the function to an expression
with a minimum number of terms.

• It is necessary, however, to make sure that the Boolean


expression is in sum-of-products form.

• Each product term can be plotted in the map in one, two,


or more squares.

• The minterms of the function are then read directly from


the map.

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• ഥB + A
Example 1: For the function Z = A ഥ C + BC + AB
ഥC

1. Express this function as a sum-of-minterms.


2. Find the minimal SOP expression

ഥC
A ഥB
A
BC
A 00 01 11 10

0 0 1 1 1

1 0 1 1 0

ഥC
AB BC

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

BC
A 00 01 11 10
• So the function has a total of five
minterms, as indicated by the five
0 0 1 1 1 1's in the map.

• The minterms are read directly


1 0 1 1 0 from the map to be 1, 2, 3, 5, and
7. So the function can be
ഥB expressed in sum-of-minterms
A form as
C
The logical sum of these
two product terms gives the Z = ෍(1, 2, 3, 5, 6)
simplified expression:

ഥB + C
Z=A

Karnaugh Maps
EXPRESSION SIMPLICATION (3-VARIABLE K-MAPS)

• Exercises: Simplify the following Boolean expressions using


3-variable maps.

ഥB
Z = AB + A ഥCത + AB
ഥ Cത

ഥ + BCത + B
Z = AB ഥCത

ഥB
Z=A ഥ Cത
ഥ + BC + AB

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Consider the general 4-variable K-map below:


D
CD Note that there are eight
AB 00 01 11 10 squares in which each
variable is equal to 1. The
00 m0 m1 m3 m2 variable appears
uncomplemented for these
01 m4 m 5 m7 m6 squares.
B
11 m12 m13 m15 m14 There are also eight squares
A in which each variable is
10 m8 m9 m11 m10 equal to 0. The variable
appears complemented for
these squares.
C

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• As in the 3-variable map, adjacent squares (horizontally or vertically, but not


diagonally) in the map represent adjacent minterms.
CD
In addition to this, the topmost squares
AB 00 01 11 10 are adjacent to the bottommost
squares.
00 m0 m1 m3 m2
m0 is adjacent to m8, m1 is adjacent
to m9, m3 is adjacent to m11 and m2
01 m4 m 5 m7 m6 is adjacent to m10.

11 m12 m13 m15 m14 The leftmost squares are adjacent to


the rightmost squares also.
10 m8 m9 m11 m10
m0 is adjacent to m2, m4 is adjacent
to m6, m12 is adjacent to m14 and
m8 is adjacent to m10.

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• As more adjacent squares are combined, a product term


with fewer literals is obtained.

– One square represents one minterm, giving a term with


four literals.
– Two adjacent squares represent a term with three
literals.
– Four adjacent squares represent a term with two
literals.
– Eight adjacent squares represent a term with one
literal.
– Sixteen adjacent squares encompass the entire map
and produce a function that is always equal 1.

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 1:

Simplify the expression: Z = ෍(0, 10, 11, 13, 14, 15)

CD The adjacent squares are:


AB 00 01 11 10
m15, m14, m10, and m11
00 1 0 0 0 m13 and m15
m0
ഥB
A ഥ 01
ഥCത D 0 0 0 0

11 0 1 1 1 The logical sum of these


three product terms gives
the simplified expression:
ABD 10 0 0 1 1 AC
ഥB
Z = AC + ABD + A ഥCത D

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 2:

Simplify the expression: Z = ෍(0, 2, 4, 6, 7, 9, 13, 15)

CD The adjacent squares are:


AB 00 01 11 10
m0, m2, m6, and m4
00 1 0 0 1 m7 and m15
m13 and m9
01 1 0 1 1

11 0 1 1 0 The logical sum of these


ഥD
A ഥ three product terms gives
the simplified expression:
10 0 1 0 0
ACത D BCD ഥD
Z=A ഥ + BCD + ACത D

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 3:

Simplify the expression: Z = ෍(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)


ഥD
A ഥ
CD The adjacent squares are:
AB 00 01 11 10
m0, m1, m5, m13, m9, m8, m12,
00 1 1 0 1 and m4
m0, m2, m6, and m4
01 1 1 0 1 m4, m6, m14, and m12

11 1 1 0 1 The logical sum of these


three product terms gives
the simplified expression:
10 1 1 0 0

BD Z = Cത + A
ഥDഥ + BD

Cത

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 4:

Simplify the expression: Z = ෍(0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)

CD The adjacent squares are:


AB 00 01 11 10
m0, m2, m10, and m8
00 1 0 1 1 m5, m7, m15, and m13
m8, m9, m11, and m10
ഥD
B ഥ 01 0 1 1 0 m3, m7, m15, and m11
CD
11 0 1 1 0 The logical sum of these
four product terms gives the
simplified expression:
BD
10 1 1 1 1
ഥD
Z=B ഥ + BD + AB
ഥ + CD

AB

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 4 (Alternative Solution 1):

Simplify the expression: Z = ෍(0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)

CD The adjacent squares are:


AB 00 01 11 10
m0, m2, m10, and m8
00 1 0 1 1 m5, m7, m15, and m13
m9, m11, m15, and m13
ഥD
B ഥ 01 0 1 1 0 m3, m7, m15, and m11
CD
11 0 1 1 0 The logical sum of these
two product terms gives the
BD simplified expression:
10 1 1 1 1
ഥD
Z=B ഥ + BD + AD + CD
AD

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 4 (Alternative Solution 2):

Simplify the expression: Z = ෍(0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)

CD The adjacent squares are:


AB 00 01 11 10
m0, m2, m10, and m8
00 1 0 1 1 m5, m7, m15, and m13
m9, m11, m15, and m13
ഥD
B ഥ 01 0 1 1 0 m3, m2, m10, and m11
ഥC
B
11 0 1 1 0 The logical sum of these
two product terms gives the
BD simplified expression:
10 1 1 1 1
ഥD
Z=B ഥ + BD + AD + B
ഥC
AD

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 5:

ഥB
Simplify the expression: Z = A ഥCത + B
ഥ CD ഥ BCD
ഥ+A ഥCത
ഥ + AB

CD ഥ CD
B ഥ
AB 00 01 11 10

00 1 1 0 1
ഥB
A ഥCത 01 0 0 0 1
ഥCത
AB 11 0 0 0 0 ഥ BCD

A

10 1 1 0 1

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Example 5:

ഥB
Simplify the expression: Z = A ഥCത + B
ഥ CD ഥ BCD
ഥ+A ഥCത
ഥ + AB

CD The adjacent squares are:


AB 00 01 11 10
m0, m2, m9, and m8
00 1 1 0 1 m0, m2, m10, and m8
m2 and m6
01 0 0 0 1
ഥD
B ഥ
The logical sum of these
11 0 0 0 0 ഥ CD
A ഥ
two product terms gives the
simplified expression:
10 1 1 0 1
ഥCത + B
Z=B ഥD ഥ CD
ഥ+A ഥ
ഥCത
B
Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Exercises: Simplify the following Boolean


expressions using 4-variable maps

ഥB
Z=A ഥCത D
ഥ + ACത D
ഥ+B
ഥ CD ഥBCD + BCത D
ഥ+A

Z = Cത D + A
ഥBഥC + ABCത + AB
ഥC

ഥBCത + A(B
ഥD + A
Z=B ഥC + BCത )

Karnaugh Maps
EXPRESSION SIMPLICATION (4-VARIABLE K-MAPS)

• Exercises: Simplify the following Boolean expressions using


4-variable maps

Z = ෍(0, 2, 4, 5, 6, 7, 8, 10, 13, 15)

Z = ෍(1, 5, 9, 10, 11, 14, 15)

Z = ෍(0, 2, 7, 8, 9, 10, 12, 13, 14, 15)

Z = ෍(1, 3, 4, 5, 10, 11, 12, 13, 14, 15)

Karnaugh Maps
DON'T CARE CONDITIONS

INPUTS OUTPUT
• Case Study A B C D Z
January 0 0 0 0 1
February 0 0 0 1 0
Derive the expression and the logic March 0 0 1 0 1
circuit with four inputs (A, B, C, and April 0 0 1 1 0
D). May 0 1 0 0 1
June 0 1 0 1 0
The values of the inputs will July 0 1 1 0 1
represent the 12 months of a year August 0 1 1 1 1
September 1 0 0 0 0
(ABCD = 0000 for January, 0001 for October 1 0 0 1 1
February, 0010 for March, etc.). November 1 0 1 0 0
December 1 0 1 1 1
The output Z should be a 1 if the 1 1 0 0
month has 31 days and 0 if 1 1 0 1
1 1 1 0
otherwise.
1 1 1 1

Karnaugh Maps
DON'T CARE CONDITIONS

Note that binary inputs 1100 to INPUTS OUTPUT


A B C D Z
1111 (12 to 15) do not represent January 0 0 0 0 1
valid months and cannot occur. February 0 0 0 1 0
March 0 0 1 0 1
Although the output Z should be 0 April 0 0 1 1 0
since these months do not have 31 May 0 1 0 0 1
June 0 1 0 1 0
days, it does not really matter July 0 1 1 0 1
whether the output is a 0 or 1 since August 0 1 1 1 1
the input combinations will never September 1 0 0 0 0
occur. October 1 0 0 1 1
November 1 0 1 0 0
December 1 0 1 1 1
So, an x is placed in the output 1 1 0 0 x
column to represent a don't care 1 1 0 1 x
condition and it can later be treated 1 1 1 0 x
as a 0 or 1 to simplify the logic. 1 1 1 1 x

Karnaugh Maps
DON'T CARE CONDITIONS

INPUTS OUTPUT
• In the canonical notation, don't care A B C D Z
conditions are written as January 0 0 0 0 1
February 0 0 0 1 0
d(list of don't-care inputs) March 0 0 1 0 1
April 0 0 1 1 0
May 0 1 0 0 1
so that June 0 1 0 1 0
July 0 1 1 0 1
Z = (list of minterms) + August 0 1 1 1 1
d(list of don't care inputs) September 1 0 0 0 0
October 1 0 0 1 1
In the example given, the SOM expression November 1 0 1 0 0
is: December 1 0 1 1 1
1 1 0 0 x
1 1 0 1 x
Z = ෍ 0, 2, 4, 6, 7, 9, 11 + d(12, 13, 14, 15) 1 1 1 0 x
1 1 1 1 x

Karnaugh Maps
DON'T CARE CONDITIONS

CD
INPUTS OUTPUT AB 00 01 11 10
A B C D Z
0 0 0 0 1
0 0 0 1 0
00 1 0 0 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
01 1 0 1 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
11 x x x x
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
10 0 1 1 0
1 0 1 1 1
1 1 0 0 x
1 1 0 1 x
1 1 1 0 x • The don't care values are used only if
1 1 1 1 x their inclusion can simplify the Boolean
expression (increase the size of a group).

Karnaugh Maps
DON'T CARE CONDITIONS

CD
INPUTS OUTPUT AB 00 01 11 10
A B C D Z
0 0 0 0 1
0 0 0 1 0
00 1 0 0 1 ഥDഥ
A
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
01 1 0 1 1
0 1 0 1 0 BC
0 1 1 0 1
0 1 1 1 1
11 x x x x
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
10 0 1 1 0 AD
1 0 1 1 1
1 1 0 0 x
1 1 0 1 x The logical sum of these three product terms
1 1 1 0 x gives the simplified expression:
1 1 1 1 x
ഥD
Z = BC + AD + A ഥ

Karnaugh Maps
DON'T CARE CONDITIONS

• Example 1:

Simplify the expression: Z = ෍ 1, 5, 6, 11, 13 + d(8, 9, 12,14, 15)

CD
AB 00 01 11 10 The adjacent squares are:

00 0 1 0 0 m1, m5, m13, and m9


m6 and m14
0 m9, m11, m15, and m13
Cത D
01 0 1 1

11 x 1 x x ഥ The logical sum of these


BCD two product terms gives the
simplified expression:
10 x x 1 0
AD Z = Cത D + BCD
ഥ + AD

Karnaugh Maps
DON'T CARE CONDITIONS

• Example 2:

Simplify the expression: Z = ෍ 1, 3, 7, 11, 15 + d(0, 2, 5)

CD
AB 00 01 11 10 The adjacent squares are:

00 x 1 1 x m3, m7, m11, and m15


m1, m3, m7, and m5
01 0 x 1 0

ഥ D 11 0 0 1 0 The logical sum of these


A two product terms gives the
simplified expression:
10 0 0 1 0
ഥD
Z = CD + A
CD
Karnaugh Maps
DON'T CARE CONDITIONS

• Example 2 (Alternative Solution):

Simplify the expression: Z = ෍ 1, 3, 7, 11, 15 + d(0, 2, 5)

CD
AB 00 01 11 10 The adjacent squares are:

00 x 1 1 x m3, m7, m11, and m15


m0, m1, m3, and m2
01 0 x 1 0

ഥBഥ 11 0 0 1 0 The logical sum of these


A two product terms gives the
simplified expression:
10 0 0 1 0
ഥB
Z = CD + A ഥ
CD
Karnaugh Maps
DON'T CARE CONDITIONS

• Example 3:

Simplify the expression: Z = ෍ 4, 5, 6, 12 + d(3, 7, 9,13)

CD
AB 00 01 11 10 The adjacent squares are:

00 0 0 x 0 m4, m5, m13, and m12


m4, m5, m7, and m6
01 1 1 x 1
ഥB
A
11 1 x 0 0 The logical sum of these
two product terms gives the
BCത simplified expression:
10 0 x 0 0
Z = BCത + A
ഥB

Karnaugh Maps
DON'T CARE CONDITIONS

• Exercises: Simplify the following Boolean expressions using


4-variable maps

Z = ෍ 1, 2, 3, 9, 10, 14, 15 + d(5, 6, 12, 13)

Z = ෍ 0, 1, 4, 7, 12, 13,14, 15 + d(3, 6, 11)

Z = ෍ 1, 2, 4 + d(3, 5, 6, 7, 11, 13, 14, 15)

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Each row of a truth table can be inputs


maxterm symbol
associated with a maxterm. A B C D
0 0 0 0 A+B+C+D M0
0 0 0 1 A+B+C+D ഥ M1
• The maxterm of a particular row 0 0 1 0 A + B + Cത + D M2
has the property that it is equal 0 0 1 1 A + B + Cത + D
ഥ M3
to 0 on the values of the input 0 1 0 0 A+B ഥ+C+D M4
variables for that row. 0 1 0 1 A+B ഥ+C+D ഥ M5
0 1 1 0 A+B ഥ + Cത + D M6
• Each maxterm is assigned a 0 1 1 1 A+B ഥ + Cത + D
ഥ M7
symbol, Mi, where the subscript i 1 0 0 0 ഥ+B+C+D
A M8
on the maxterm is the number of 1 0 0 1 ഥ+B+C+D
A ഥ M9
the row on which it equals 0 (the 1 0 1 0 ഥ + B + Cത + D
A M10
row numbers are obtained by 1 0 1 1 ഥ + B + Cത + D
A ഥ M11
reading the values of the 1 1 0 0 ഥ+B
A ഥ+C+D M12
variables on that row as a binary 1 1 0 1 ഥ+B
A ഥ+C+D ഥ M13
number). 1 1 1 0 ഥ+B
A ഥ + Cത + D M14
1 1 1 1 ഥ+B
A ഥ + Cത + D
ഥ M15

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Derive the logic expression for the following truth tables using the POM Method.

INPUTS OUTPUT
A B C D Z
0 0 0 0 0 M0
0 0 0 1 0 M1 Z = ෑ(0, 1, 5, 12, 13, 14, 15)
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0 M5
Z = M0 M1 M5 M12 M13 M14 M15
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1 Z
1 1 0 0 0 M12 ഥ )(A + B
= (A + B + C + D)(A + B + C + D ഥ+C
1 1 0 1 0 M13 +D ഥ+B
ഥ )(A ഥ + C + D)(Aഥ+Bഥ+C+D ഥ+B
ഥ )(A ഥ + Cത
1 1 1 0 0 M14 ഥ+Bഥ + Cത + D
ഥ)
+ D)(A
1 1 1 1 0 M15

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Simplification of product-of-maxterms expressions using K-maps is very much


similar to the simplification of sum-of-products expressions.

• The major difference is that 0s are grouped together instead of 1s and each
group represent a sum term instead of a product term.

• Rules in Grouping of 0s:

– Groups may be vertical or horizontal but not diagonal.


– The number of 0s in a group should be a power of 2 (1, 2, 4, 8, etc.).
– The shape of a group should be regular (square or rectangular).
– Groups should be as large as possible thereby minimizing the total number
of groups.
– Every 0 in the map must be a member of a group.
– A 0 can be a member of several groups (overlapping). However, each group
should have at least one member that is not member of another group.

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 1:

Simplify the expression: Z = ෑ(1, 3, 7)

A + Cത The adjacent squares are:


BC M1 and M3
A 00 01 11 10
M3 and M7
0 1 0 0 1
The logical product of these
1 1 1 0 1 two sum terms gives the
simplified expression:

ഥ + Cത
B Z = (A + Cത )(B
ഥ + Cത )

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 2:

Simplify the expression: Z = ෑ(0, 2, 4, 5, 6)

The adjacent squares are:


C
BC M0, M2, M6, and M4
A 00 01 11 10
M4 and M5
0 0 1 1 0
The logical product of these
1 0 0 1 0 two sum terms gives the
simplified expression:

ഥ+B
A ഥ + B)
Z = C(A

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 3:

Simplify the expression: Z = ෑ(0, 1, 2, 4, 5, 6, 10, 12, 14)

CD
The adjacent squares are:
AB 00 01 11 10
M2, M6, M14, and M10
00 0 0 1 0 M0, M1, M5, and M4
M4, M6, M14, and M12
01 0 0 1 0
ഥ+D
B
11 0 1 1 0 The logical product of these
three sum terms gives the
A+C simplified expression:
10 1 1 1 0
Z = (Cത + D)(A + C)(B
ഥ + D)
Cത + D

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 4:

Simplify the expression: Z = ෑ 0, 1, 2, 8, 10, 11, 14, 15 + d(3, 7, 9,13)

CD
AB 00 01 11 10 The adjacent squares are:

00 0 0 x 0 M11, M15, M14, and M10


M0, M1, M3, M4, M10. M11, M9,
01 1 1 x 1 B and M8

11 1 x 0 0 The logical product of these


two sum terms gives the
simplified expression:
10 0 x 0 0 ഥ + Cത
A
ഥ + Cത B
Z= A

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 5:

Simplify the expression: Z = ෑ 4, 6, 8, 9, 10, 12, 13, 14 + d(0, 2, 5)

CD
AB 00 01 11 10 The adjacent squares are:

00 x 1 1 x M0, M4, M12, M8, M10, M14, M6,


and M2
1 M12, M13, M9, and M8
01 0 x 0

11 0 0 1 0 The logical sum of these


two product terms gives the
simplified expression:
ഥ+C
A 10 0 0 1 0
ഥ + C)
Z = D(A
D
Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 6:

Simplify the expression: ഥ+D


Z = (B ഥ+B
ഥ )(A + B + C)(A ഥ + Cത + D)

CD
AB 00 01 11 10

00 0 0 1 1
ഥ+B
A ഥ + Cത + D
A+B+C
01 1 0 0 1

11 1 0 0 0
ഥ+D
B ഥ 10 1 1 1 1

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Example 6:

Simplify the expression: ഥ+D


Z = (B ഥ+B
ഥ )(A + B + C)(A ഥ + Cത + D)

CD A+B+C
The adjacent squares are:
AB 00 01 11 10
M5, M7, M15, and M13
00 0 0 1 1 M0 and M1
ഥ+B
ഥ + Cത M15 and M14
A
01 1 0 0 1
The logical product of these
11 1 0 0 0 three sum terms gives the
simplified expression:
10 1 1 1 1
ഥ+D
Z = (B ഥ+B
ഥ )(A + B + C)(A ത
ഥ + C)
ഥ+D
B ഥ

Karnaugh Maps
PRODUCT-OF-SUMS SIMPLIFICATION

• Exercises: Simplify the following Boolean expressions using


4-variable maps

Z = ෑ(1, 3, 5, 7, 13, 15) Z = ෑ(1, 3, 6, 9, 11, 12, 14)

Z = (A + Cത + D ഥ+B
ഥ )(A ഥ+D ഥ+B+D
ഥ )(A ഥ + B + C)
ഥ )(A ത

ഥ+B
Z = (A ഥ+D ഥ+B
ഥ )(A ഥ + C)
ഥ)(A ത

Z = ෑ 0, 6, 8, 13, 14 + d(2, 4, 10)

Karnaugh Maps
5-VARIABLE K-MAPS

E=0 E=1
• A 5-variable K-Map
can be constructed CD CD
using two 4-variable AB 00 01 11 10 AB 00 01 11 10
K-Maps.
00 00

• The two halves are 01 01


distinguished by the
fifth variable, which
can be equal to 0 or 11 11
1.
10 10
• Imagine a map like
those drawn
previously, with an
identically sized • Cells directly above
map stacked directly and below each
on top of the other. other are adjacent.

Karnaugh Maps
5-VARIABLE K-MAPS

E=0 E=1 ഥC
A
CD CD
AB 00 01 11 10 AB 00 01 11 10

00 0 0 1 1 00 1 0 1 1
01 1 0 1 1 01 0 0 1 1
ഥB
A ഥD
ഥE
11 0 1 0 0 11 0 0 0 1
ഥ BD
A ഥഥE
10 0 1 0 0 10 0 0 0 1

ACത Dഥ
E ഥE
CD
ഥ C + CD
Z=A ഥ E + ACത Dഥ ഥ BD
E+A ഥഥ ഥB
E+A ഥD
ഥE

Karnaugh Maps
5-VARIABLE K-MAPS

E=0 E=1 ഥ CD
A ഥ
CD CD
AB 00 01 11 10 AB 00 01 11 10

00 0 0 1 1 00 0 1 0 1
01 1 0 0 1 01 1 0 0 1

BD
11 1 0 0 1 11 1 0 0 1
10 0 0 1 0 10 0 1 0 0
ഥCത DE
B
ഥCDഥ
B E
Z = BD ഥ CD
ഥ+A ഥ+B
ഥCDഥ ഥCത DE
E+B

Karnaugh Maps
6-VARIABLE K-MAPS
CD EF = 00 CD EF = 10
AB 00 01 11 10 AB 00 01 11 10

00 00

01 01
• Treat a 6-
11 11 variable K-map
as 4 layers of 16
10 10 cells.

CD EF = 01 CD EF = 11 • Cells directly
AB 00 01 11 10 AB 00 01 11 10 above and
below each
00 00 other are
adjacent.
01 01

11 11

10 10

Karnaugh Maps

You might also like