Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

ECE 322

LOGIC CIRCUITS AND


SWITCHING THEORY

Module 7
The Karnaugh Map Method
(Kmap)
2, 3, 4 variable K-mapping
Objectives

At the end of the lesson, you as a


student should be able to :
 Derive the simplified expression using
k- mapping with two, three and four
variables.

L.G. Arcega
UDM-CET
KARNAUGH MAP

The KARNAUGH MAP is a useful tool for simplifying and


manipulating switching functions of two, three, or four variables,
but it can be extended to functions of five or more variables.
The K-map like a truth table is a means for showing the
relationship between logic inputs and the desired output. Given on
the next slides are examples showing how the k-map is drawn for
two, three, and four variables from the truth table.

Problems in using Algebraic Procedures:


• Procedures are difficult to apply in a systematic way
• Difficult to tell when you have arrived at a minimum solution

L.G. Arcega
MAP
 a diagram made up of squares, with each square
representing one minterm of the function

A Boolean function is recognized graphically by those


squares whose minterms are included in the
function.

 presents a visual diagram of all possible ways a function


may be expressed in a standard form

By recognizing various patterns, the user can derive alternative


algebraic expressions for the same function.

NOTE: The simplified expressions produced by the map are


always in the sum-of-products or product-of-sums form.
L.G. Arcega
2-variable K-Map 3-variable K-Map

3-variable K-Map
4-variable K-Map

L.G. Arcega
2-VARIABLE MAP
consists of 4 squares, one for each minterm
INPUT Y
Minterm Minterm Y
X X X 0 1
Y Designation 0 1
0 X’Y’ X’Y 0 m0 m1
0 0 X’ Y’ m0
m1 1 XY’ XY 1 m2 m3
0 1 X’ Y
1 0 X Y’ m2 3 variable map Minterm designation
1 1 XY m3 X=0;Y=0 X=1;Y=1
X=1;Y=0
X=0;Y=1
X
X
X=0;Y=0 Y Y 0 1
0 1
X=0;Y=1 0 m0 m2
0 X’Y’ XY’ X=1;Y=0

1 X’Y XY 1 m1 m3
X=1;Y=1

L.G. Arcega
Example: Derive the equation of the Boolean function F and the
draw the equivalent circuit. Input Output

X Y F
0 0 0
0 1 1
1 0 1
Solution: 1 1 1
Y Y Y
X 0 1 X 0 1 X 0 1
0 0 1 0 X’Y’ X’Y 0 m0 m1

1 1 1 1 XY’ XY 1 m2 m3

F = X+Y Maxterm designation

If you try to take a look at k-map, there will be 2 groups, wherein both are actually
pair. To form the equivalent expression for a group , you have to consider only those
literals that didn’t change. In short, you have to consider only common literals to be
part of the expression. Each group repreLsG. e.nArtcsegaa minterm that are logically added.
Example: (cont.)
Deriving the equation of the Boolean function F using simplification
by properties
Fsop=X’Y+XY’+XY
Solution:
+ m2 + m3
Fsop = m1
Fsop= X’Y+X(Y’+Y) but (Y’ + Y) = 1
Fsop=X’Y+X since X = X + XY
F sop= X’Y + X + XY
F sop= X + Y (X’ + X) but X’ + X = 1
Fsop= X+Y

L.G. Arcega
Y Y Y
X 0 1 X 0 1 X 0 1

0 0 1 0 X+Y X+Y’ 0 M0 M1

1 1 1 1 X’+Y X’+Y’ 1 M2 M3

Maxterm designation

Using K-map considering zero output, wherein each group is equal to a maxterm
Fpos = M0
Fpos= X+Y

X
F
Y

L.G. Arcega
3-VARIABLE MAP
consists of 8 squares, one for each minterm

BASIC PROPERTIES OF ADJACENT SQUARES

Any two(2) adjacent squares placed horizontally or vertically


(but not diagonally) to form a rectangle correspond to minterms
that differ in only a single variable.

SIMPLIFICATION PROCESS:
1. One square represents a minterm of 3 literals
2. A rectangle of 2 squares is a product term of 2 literals / pair
3. A rectangle of 4 squares represents a product term of 1 literal /
quad
4. A rectangle of 8 squares yields a function that is equal to 1

L.G. Arcega
Input
Minterm
X Y Z
0 0 0 m0
0 0 1 m1
0 1 0 m2
0 1 1 m3
1 0 0 m4
1 0 1 m5
1 1 0 m6
1 1 1 m7

L.G. Arcega
YZ YZ
00 01 11 10 X 00 01 11 10
X
m0 m1 m3 M2
0 X’Y’Z’ X’Y’Z X’YZ X’YZ’ 0
m4 m5 m7 m6
1 XY’Z’ XY’Z XYZ XYZ’ 1

3 variable map Minterm designation

Z Z
XY 0 1 XY 0 1
X’Y’Z’ X’Y’Z m0 m1
00 00
X’YZ’ X’YZ m2 m3
01 01
XYZ’ XYZ m6 m7
11 11
XY’Z’ XY’Z m4 m5
10 10

L.G. Arcega
XY XY
00 01 11 10 Z 00 01 11 10
Z
m0 m2 m6 m4
0 X’Y’Z’ X’YZ’ XYZ’ XY’Z’ 0
m1 m3 m7 m5
1 X’Y’Z X’YZ XYZ XY’Z’ 1

3 variable map Minterm designation

X X
YZ 0 1 YZ 0 1
X’Y’Z’ XY’Z’ m0 m4
00 00
X’Y’Z XY’Z m1 m5
01 01
X’YZ XYZ m3 m7
11 11
X’YZ’ XYZ’ m2 m6
10 10

L.G. Arcega
Example:
Simplify the Boolean function F (X,Y,Z) = ∑ m(2,3,4,5) using a map.
Draw the equivalent circuit.

Solution:
F = m2 + m3 + m4 + m5
YZ
X 00 01 11 10 YZ 00 01 11 10
X
0 1 1
0 X’YZ X’YZ’
1 1 1 1 XY’Z’ XY’Z

Fsop=X’Y+ XY’

If you try to take a look at k-map, there will be 2 groups, wherein both are actually
pair. To form the equivalent expression for a group , you have to consider only those
literals that didn’t change. In short, you have to consider only common literals to be
part of the expression. Each group reprLeG. s.eAnrctesgaa minterm that are logically added.
Recall simplification solution using properties:
F = m2 + m3 + m 4 + m5
Fsop = (X’YZ’ + X’YZ) + (XY’Z’ + XY’Z)
Fsop = [X’Y(Z’ + Z)] + [XY’(Z’ + Z)]

YZ 00 01 11 10
X
0 X’YZ X’YZ’
Fsop=X’Y+ XY’
1 XY’Z’ XY’Z

L.G. Arcega
L.G. Arcega
Simplify the Boolean function F (X,Y,Z) = ∏ M(0,1,6,7) using a map.
Draw the equivalent circuit

Solution:
F = M0 + M1 + M6 + M7

YZ YZ
X 00 01 11 10 00 01 11 10
X
0 0 0 0
X+Y+Z X+Y’Z
1 0 0 1
X’+Y’+Z’ X’+Y’+Z
Assigned Maxterm

Fpos= (X+Y) (X’+Y’)

L.G. Arcega
Recall simplification solution using properties:

F = M0 + M 1 + M6 + M7
Fpos= (X+Y+Z) (X+Y+Z’) (X’+Y’+Z) (X’+Y’+Z’)
F’pos= X’Y’Z’ + X’Y’Z + XYZ’ + XYZ
F’pos= X’Y’(Z’+Z) + XY (Z ‘+ Z)
F’pos= X’Y’ + XY

Fpos = (X+Y) (X’+Y’)


YZ 00 01 11 10
X
0 X+Y+Z X+Y+Z’
1 X’+Y’+Z’ X’+Y’+Z

L.G. Arcega
L.G. Arcega
Fpos = (X+Y) (X’+Y’)
That when you apply distribution
F= XX’+XY’+X’Y +Y Y’) F
=0+XY’+X’Y +0)
F =XY’+X’Y (Same with
SOP)
And can also be simplified as F
= X ⊕Y

L.G. Arcega
Example 2:
Simplify the Boolean function F (X,Y,Z) = ∑ m(0,2,4,6) using a map.

Solution:
F = m2 + m3 + m4 + m5

YZ YZ 00 01 11 10
X
X 00 01 11 10
0 X’Y’Z’ X’YZ’
0 1 1 1 XY’Z’ XYZ’
1 1 1
Assigned Minterm
Z F
F = Z’
Using properties Or k=map w/2 pairs ;w/out rolling
F = (X’Y’Z’ + XY’Z’) + (X’YZ’ + XYZ’) F = Y’Z’ + YZ’
F = Z’ (Y’+ Y)
F = [Y’Z’(X’ + X)] + [YZ’(X’ + X)] F= Z’ (1)
F=Y’Z’+ YZ’ = Z’ ( Y’ + Y) F= Z’
F = Z’ L.G. Arcega
Or
F = X’Y’Z’ + XY’Z’ + X’YZ’ +
XYZ’

F = [X’Z’(Y’ + Y)] + [XZ’(Y’ +


Y)] F=X’Z’+ XZ’= Z’ ( X’ + X)

F = Z’ Z F

L.G. Arcega
Example:
Simplify the Boolean function F (X,Y,Z) = ∏ M(1,3,5,7) using a map.

Solution:
F = m2 + m3 + m4 + m5
YZ YZ 00 01 11 10
X 00 01 11 10 X
0 X+Y+Z’ X+Y’+Z’
0 0 0 1 X’+Y+Z’ X’+Y’+Z’
1 0 0
Assigned Minterm
Z F
F = Z’

using properties F = (X+Z’)(X’+Z’)


Fpos= (X+Y+Z’) (X+Y’+Z’) (X’+Y+Z’) (X’+Y’+Z’) F’= X’Z+XZ
F’= Z (X’+X)
F’pos = X’Y’Z + X’YZ + XY’Z + XYZ F’= Z(1)
F’pos = X’Z(Y’ + Y) + XZ(Y’ + Y) F’=Z
F’pos=X’Z+ XZ = Z ( X’ +G.LX. Ar)ce=ga F = Z’
4-VARIABLE MAP
consists of 16 squares, one for each minterm

BASIC PROPERTIES OF ADJACENT SQUARES

Any adjacent squares placed horizontally or vertically (but not


diagonally) to form a rectangle correspond to minterms that
differ in only a single variable.

SIMPLIFICATION PROCESS:
1. One square represents a minterm of 4 literals
2. A rectangle of 2 squares is a product term of 3 literals / pair
3. A rectangle of 4 squares represents a product term of 2
literals / quad
4. A rectangle of 8 squares represents a product term of 1 literal /
octet
5. A rectangle of 16 squares yields a function that is equal to 1
L.G. Arcega
Input
Minterm
A B C D
0 0 0 0 m0
0 0 0 1 m1
0 0 1 0 m2
0 0 1 1 m3
0 1 0 0 m4
0 1 0 1 m5
0 1 1 0 m6
0 1 1 1 m7
1 0 0 0 m8
1 0 0 1 m9
1 0 1 0
m10
1 0 1 1
m11
1 1 0 0
m12
1 1 0 1
m13
1 1 1 0
m14
1 1 1 1 L.G.
Arceg
ma 15
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 m0 m4 m12 m8
00 A’B’C’D’ A’BC’D’ ABC’D’ AB’C’D’

01 m1 m5 m13 m9 01 A’B’C’D A’BC’D ABC’D AB’C’D

11 m3 m7 m15 m11 11 A’B’CD A’BCD ABCD AB’CD

10 m2 m6 m14 m10 10 A’B’CD’ A’BCD’ ABCD’ AB’CD’

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

00 m0 m1 m3 m2 00 A’B’C’D’ A’B’C’D A’B’CD A’B’CD’

01 m4 m5 m7 m6 01 A’BC’D’ A’BC’D A’BCD A’BCD’

11 m12 m13 m15 m14 11 ABC’D’ ABC’D ABCD ABCD’

10 m8 m9 m11 m10 10 AB’C’D’ AB’C’D AB’CD AB’CD’


L.G. Arcega
Using K-map simplify the following
functions.
Find the simplified SOP, POS and other
(like applying basic principles, exclusivity -
if any).
1. f1 (A,B,C,D) = ∑ m(0,1,6,7,8,9,14,15)
2. f2 (A, B, C,D) = ∏ M(0,2,4,6,8,10)

L.G. Arcega
1. f1 (A,B,C,D) = ∑ m(0,1,6,7,8,9,14,15)
AB AB
CD CD 00 01 11 10
00 01 11 10

00 m0 m8 00 A’B’C’D’ AB’C’D’

01 m1 m9 01 A’B’C’D AB’C’D

11 m7 11 A’BCD ABCD
m15

m6 10 A’BCD’ ABCD’
10 m14

AB
CD 00 01 11 10
f1sop= B’C ‘+ BC
00 1 1
01 1 1
11 1 1 f1= (B⊕C)’
10 1 1
L.G. Arcega
1. f1 (A,B,C,D) = ∏M(2,3,4,5,10,11,12,13)
AB AB
CD 00 01 11 10 CD
00 01 11 10

00 M4 M12 00 A+B’+C+D A’+B’+C’+D’

01 M5 M13 01 A+B’+C+D’ A’+B’+C+D’

11 M3 M11
11 A+B+C’+D’ A’+B+C’+D’

10 M2 M10
10 A+B+C’+D A’+B+C’+D
AB
CD 00 01 11 10
00 0 0 f1= (B’+C ) (B+C’)
01 0 0
11 0 0
10 0 0

L.G. Arcega
f1 circuits

SOP

EXCLUSIVE

POS

L.G. Arcega
2. f2 (A, B, C,D) = ∏ M(0,2,4,6,8,10)
AB AB
CD 11 10 CD
00 01 00 01
11
10

00 M0 M4 M8 A+B’+C+D
00 A+B+C+D A’+B+C+D

01
01

11
11

10 M2 M6
M10 10 A+B+C’+D A+B’+C’+D A’+B+C’+D
AB
CD 00 11 10
f2= (B+D ) (A+D)
01

00 0 0 0

01
F2=AB+BD+AD+D
11 F2=AB +D(B+A+1)
10 0 0 0 F2= AB +D(1)= AB+D
L.G. Arcega
2. f2 (A, B, C,D) = ∏ M(0,2,4,6,8,10)
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 m12 00 ABC’D’

01 m1 m5 m13 m9 01 A’B’CD’ A’BC’D ABCD’ AB’C’D

m3 m7 11 A’B’CD A’BCD ABCD AB’CD


11 m15 m11
10 ABCD’
10 m14
AB
CD 00 01 11 10
00 1
01 1 1 1 1 f2sop= D+ AB
11 1 1 1 1
10 1

L.G. Arcega
f2 circuits

POS

SOP

L.G. Arcega
Thanks for your
time.
Do you have any question related to our
topic for today?

PM is the key

I will try to attend to your needs as soon


as possible.

L.G. Arcega
UDM-CET

You might also like