Вы находитесь на странице: 1из 26

UNIVERSITY OF MOSUL

COLLEGE OF ENGINEERING
MECHATRONICS ENG. DEPARTMENT

Digital logic design


Second class
Lecturer: Zahraa Tarik.A.

KARNAUGH MAPS (K-MAP)


Karnaugh Maps

Two Problems of Simplifying a Switching Function Using


Algebraic Techniques

1. Difficult to apply in a systematic way.


2. Difficult to tell when you have arrived at a minimum
solution.

Karnaugh Map method

Easy and systematic to get a minimum solution.


Karnaugh Maps
 A graphical map method to simplify Boolean
function up to 6 variables
 A diagram made up of squares
 Each square represents one minterm (or
maxterm) of a given Boolean function
 For n-variable function, we need 2^n squares (cells)
 K-map cells are arranged such that adjacent
cells correspond to truth rows that differ in
only one bit position (logical adjacency).
Karnaugh Maps
 If mi is a minterm of f, then place a 1 in cell i
of the K-map.

 If Mi is a maxterm of f, then place a 0 in cell i.

 If di is a don’t care of f, then place a d or x in


cell i.
Truth table to K-Map

B
A B P A 0 1
0 0 1 0 1 1
0 1 1
1 0 0 1 1
1 1 1
minterms are represented by a 1
The expression is:
in the corresponding location in
the K map.
A.B + A.B + A.B
Two-Variable K-Map
 Adjacent 1’s can be “paired off”
 Any variable which is both a 1 and a zero in
this pairing can be eliminated
 Pairs may be adjacent horizontally or
vertically B
a pair
A 0 1
0 1 1
B is eliminated,
leaving A as the term 1 1
A is eliminated, another pair
The expression leaving B as the term
becomes A + B
Three-Variable K-Map

Two bit
changed at
m0 m2 m6 m4 the same
time

m1 m3 m7 m5
THREE-VARIABLE K-MAP

ab
c 00 01 11 10

0 m0 m2 m6 m4

1 m1 m3 m7 m5
THREE-VARIABLE K-MAP

ab
c 00 01 11 10

Edges are adjacent


THREE-VARIABLE K-MAP EXAMPLE
Plot 1’s (minterms) of switching function

ab
c 00 01 11 10

0 1

1 1 1 1
THREE-VARIABLE K-MAP EXAMPLE
Plot 1’s (minterms) of switching function

ab
c 00 01 11 10
ab
bc
0 1

1 1 1 1

F  a , b , c   ab  bc
MORE EXAMPLES
CLASS WORK
 ΣA,B,C(6,7,8,d10,d11,d12,d13,d14,d15)

 f(a,b,c,d) = m(3,7,11,12,13,14,15)
Four-variable K-Map

Two bit
m0 m4 changed at
m8 m12 the same
time
m1 m5 m9 m13
m2 m6 m10 m14

m3 m7 m11 m15
Four-variable K-Map

ab
cd 00 01 11 10

00 m0 m4 m12 m8
01 m1 m5 m13 m9
11 m3 m7 m15 m11
10 m2 m6 m14 m10
FOUR-VARIABLE K-MAP
FOUR-VARIABLE K-MAP EXAMPLE
ab
00 01 11 10 abd
cd
00
1 1 abcd

01
1
abd
11

10
1 1
F  a , b , c , d    m  0, 2, 9,12,14 
Five-Variable Karnaugh Maps
Six-variable K-Map
F(U, V, W, X, Y, Z)   m(1, 5, 9, 13, 21, 23, 29, 31, 37, 53, 61)  d (45)
YZ YZ
WX 00 01 11 10 WX 00 01 11 10

00 1 00

01 1 01 1 1

11 1 1 11 1 1

10 1 10
U,V=0,0 U,V=0,1
YZ YZ F  XYZ  UWXZ  UVYZ  UVXZ
WX 00 01 11 10 WX 00 01 11 10

00 00

01 1 01 1

11 d 11 1

10 10
U,V=1,0 U,V=1,1
Class Work

Group the 1s in each Karnaugh maps

Вам также может понравиться