You are on page 1of 19

TOPICS TO COVER

 Gray Code
 K-Map
 History
 Introduction
 Use Of K-Map
 Gate Level Minimization
 2-variable K-map
 3-variable K-map
 4-variable K-map
 5-variable K-map
GRAY CODE
 Invented by Frank Gray..

 Binary numeral system where two
successive values differ in only one bit.
2-bit Gray code
000
00 001
01 3-bit Gray code 011
11 010
10 110
111
101
100

Source: wikipedia.org
0000
0001
0011

4-bit Gray code 0010
0110
0111
0101
0100
1100
1101
1111
1110
1010
1011
1001
1000

Source: wikipedia.org
BINARY TO GRAY CODE
CONVERSION
Modulo 2 Arithmetic
• Step 1: 101101 first write the MSB as it is i.e,
darken bit i.e, 1
Step 2: add MSB and bit next to the MSB i.e,
1+0=1
Step 3: again add 0 and 1 we get i.e, 0+1=1
Step 4: again add 1 and 1 we get 1+1=0
Step 5: in previous step carry is occurred so
neglect that carry . note that don't add carry to
next add numbers
then again add 1+0 1+0=1
step 6: add 0+1 0+1= 1 

Answer: Gray Code is : 111011
Source: Notes from
University of Colorado
KARNAUGH MAP
HISTORY
 The Karnaugh map was invented in 1952 by 
Edward W. Veitch and developed further 1953
by Maurice Karnaugh.
 Edward W. Veitch was an American
mathematician. He invented in 1952 a graphical
procedure for the optimization of digital circuits.
 Maurice Karnaugh, a telecommunications
engineer, redefined the Karnaugh map at Bell
Labs in 1953.

Source: wikipedia.org
INTRODUCTION
 Systematic method to obtain simplified sum-of-products (SOPs)
Boolean expressions.
 Objective: Fewest possible terms/literals.
 Diagrammatic technique based on a special form organised as a
matrix of squares.
 Easy with visual aid.

Source: Online Notes from
Georgia Institute of
Technology.
WHY USE K-MAP??

• FOR GATE LEVEL MINIMIZATION..
WHAT IS GLM??
 K-Map is also known as Reduction Map because it reduces the use of
Algebraic expressions..
 This is what the logic behind the use of K-Map is the Gate Level
Minimization..
 Gate level Minimization means that it reduces the number of gates use in
our final practical and theoratical calculations and circuits..
 In short it reduces the use of Logic gates..

 Will give you some examples to understand this core concept..
2-VARIABLE K-MAPS
 Each square represents a minterm.
 Adjacent squares always differ by just one literal (so that the
unifying theorem may apply: a + a' = 1)
 For 2-variable K-maps there will be four minters > 2^2=4.

 For 2-variable case (e.g.: variables a,b), the map can be drawn
as:

b b
OR
a'b a'b m0 m1
'
a ab' ab a m2 m3

Source: Morris Mano 4th e
2-VARIABLE K-MAPS
 Truth table coresponding
values of minterms..

A B m interm B
0 0 A ’B’ = m 0 0 1
0 1 A ’B = m 1 0 A’B’ A’B
A
1 0 A B’ = m 2 1 AB’ AB

1 1 A B = m3

Source: ebooks from Google.
scribd.com
3-VARIABLE K-MAPS
 There are 8 minterms for 3 variables (a, b, c). Therefore, there
are 8 cells in a 3-variable K-map.

b
b
bc
bc
a a 00 01 11 10
00 01 11 10
0 m0 m1 m3 m2
0 a'b'c a'b'c a'bc a'bc'
' OR
a m4 m5 m7 m6
a
1 ab'c' ab'c abc abc' 1

c
c

graycode sequence

Source: Diagram from
California State University’s
Notes.
3-VARIABLE K-MAPS
 There is wrap-around in the K-map:
 a'b'c' (m0) is adjacent to a'bc' (m2)
 ab'c' (m4) is adjacent to abc' (m6)
bc
a
00 01 11 10
0 m0 m1 m3 m2

m4 m5 m7 m6
1

Each cell in a 3-variable K-map has 3 adjacent neighbours.
In general, each cell in an n-variable K-map has n adjacent neighbours.
For example, m0 has 3 adjacent neighbours: m1, m2 and m4.
Source: Diagram from
California State University’s
Notes.
4-VARIABLE K-MAPS
 There are 16 cells in a 4-variable (w, x, y, z) K-map.

y
yz
wx 00 01 11 10
00 m0 m1 m3 m2

m4 m5 m7 m6
01
x
m1 m1 m1 m1
11 2 3 5 4
w
m8 m9 m1 m1
10 1 0

z

Source: Diagram from
California State University’s
Notes.
4-VARIABLE K-MAPS
 There are 2 wrap-arounds: a horizontal wrap-around and a vertical
wrap-around.
 Every cell thus has 4 neighbours. For example, the cell
corresponding to minterm m0 has neighbours m1, m2, m4 and
m8.

yz y
wx
m0 m1 m3 m2

m4 m5 m7 m6
x
m1 m1 m1 m1
w 2 3 5 4
m8 m9 m1 m1
1 0

z

Source: Diagram from
California State University’s
Notes.
5-VARIABLE K-MAPS
 Maps of more than 4 variables are more difficult to use because
the geometry (hyper-cube configurations) for combining adjacent
squares becomes more involved.
 For 5 variables, e.g. vwxyz, need 25 = 32 squares.

Source: Morris Mano 4th e
5-VARIABLE K-MAPS
 Organised as two 4-variable K-maps:

v' v
y y
yz yz
wx 00 01 11 10 wx 00 01 11 10
00 m0 m1 m3 m2 00 m1 m1 m1 m1
6 7 9 8
m4 m5 m7 m6 m2 m2 m2 m2
01 01
x 0 1 3 2 x
m1 m1 m1 m1 m2 m2 m3 m3
11 2 3 5 4 11 8 9 1 0
w w
m8 m9 m1 m1 m2 m2 m2 m2
10 1 0 10 4 5 7 6

z z

Source: Diagram from
California State University’s
Notes.