Gate Level Minimization: Karnaugh Map (K-Map) Method

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

Gate Level Minimization

 Although truth tables representation of a function is


unique, it can be expressed algebraically in different
forms
 The procedure of simplifying Boolean expressions is
difficult since it lacks specific rules to predict the
successive steps in the simplification process.
 Alternative

Karnaugh
KarnaughMap
Map(K-map)
(K-map)Method
Method
K-Map
AAK-Map
K-Mapisisaa graphical
graphicalrepresentation
representation of
of aa logic
logic
function’s
function’struth
truthtable
table

y
y
x
m0 m1
m2 m3 x
Re-arranging the Truth Table
 A two-variable function has four possible minterms. We can re-
arrange these minterms into a Karnaugh map

 Now we can easily see which minterms contain common literals


 Minterms on the left and right sides contain y’ and y respectively
 Minterms in the top and bottom rows contain x’ and x respectively
K-Map Simplification
 Imagine a two-variable sum of minterms:

x’y’ + x’y
 Both of these minterms appear in the top row of a Karnaugh map, which
means that they both contain the literal x’

 What happens if you simplify this expression using Boolean algebra?

x’y’ + x’y = x’(y’ + y) [ Distributive ]


= x’  1 [ y + y’ = 1 ]
= x’ [x1=x]
K-Map:Two-Variable Examples
 Another example expression is x’y + xy
 Both minterms appear in the right side, where y is
uncomplemented
 Thus, we can reduce x’y + xy to just y
K-Map:Two-Variable Examples
 How about x’y’ + x’y + xy?
 We have x’y’ + x’y in the top row, corresponding to x’
 There’s also x’y + xy in the right side, corresponding to y
 This whole expression can be reduced to x’ + y
K-Map:Two-Variable Examples
 The truth table for the
function F(x,y) = xy is
shown at the right along
with its corresponding
Kmap.
K-Map:Two-Variable Examples
 As another example, we give
the truth table and KMap for
the function, F(x,y) = x + y at
the right.
 This function is equivalent to
the OR of all of the minterms
that have a value of 1. Thus:
K-Map Simplification
 We can reduce complicated expression to its simplest
terms by finding adjacent 1s in the Kmap that can be
collected into groups that are powers of two.
 In our example, we have two such groups:
K-Map Simplification: Rules
 Groupings can contain only 1s; no 0s.
 Groups can be formed only at right angles; diagonal groups are not
allowed.
 The number of 1s in a group must be a power of 2 – even if it
contains a single 1.
 The groups must be made as large as possible.
 Groups can overlap and wrap around the sides of the Kmap.
Three Variable K-Map
 For a three-variable expression with inputs x, y, z, the
arrangement of minterms is more tricky:

 Another way to label the K-map (use whichever you like):


Why this Ordering?
 With this ordering, any group of 2, 4 or 8 adjacent squares on the map
contains common literals that can be factored out
x’y’z + x’yz
= x’z(y’ + y)
= x’z  1
= x’z

 “Adjacency” includes wrapping around the left and right sides:


x’y’z’ + xy’z’ + x’yz’ +
xyz’
= z’(x’y’ + xy’ + x’y + xy)
= z’(y’(x’ + x) + y(x’ + x))
= z’(y’+y)
 We’ll use this property of adjacent squares =to do
z’ our simplifications.
Examples: Three Variable Kmap
yz

x
Examples: Three Variable Kmap

14
Examples: Three Variable Kmap
Given:

(a) Express F in sum of minterms.


(b) Find the minimal sum of products using K-Map
Examples: Three Variable Kmap

m0 m1 m3 m2

m4 m5 m7 m6
Examples: Three Variable Kmap

y’z xy
F(x,y,z)= y’z + xy

17
Examples: Three Variable Kmap

x’z + y’z + xyz’

18
Kmaps can be tricky

y’z + yz’ + xy y’z + yz’ + xz

19
Three Variable Kmaps
 One square represents one minterm  a term of 3
literals

 Two adjacent squares  a term of 2 literals

 Four adjacent squares  a term of 1 literal

 Eight adjacent squares  the function equals to 1


Four Variable Kmap
Four Variable Kmap
Example: 4 Variable Kmap
Simplify m0+m2+m5+m8+m10+m13
Example: 4 Variable Kmap
Simplify F(A,B,C,D) =
Represented by 0001 or 0000
Four Variable Kmap
 One square represents one minterm  a term of 4 literals

 Two adjacent squares  a term of 3 literals

 Four adjacent squares  a term of 2 literal

 Eight adjacent squares  a term of 1 literal

 Sixteen adjacent squares  the function equals to 1


Example: 4 Variable Kmap
Simplify F(w,x,y,z) = S(0,1,2,4,5,6,8,9,12,13,14)
References
 Chapter 3 – Digital Design Morris Mano

You might also like