0% found this document useful (0 votes)
23 views34 pages

4.updated Lecture Chapter 3

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)
23 views34 pages

4.updated Lecture Chapter 3

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/ 34

Chapter 3

Gate-Level Minimization
Karnaugh Maps
POS Simplification
Don’t Care Conditions
NAND and NOR
Exclusive OR
K-Map

• Provide an alternative technique for representing


Boolean functions
• Box for every line of the Truth Table
• Karnaugh map's input values must be ordered such
that the values for adjacent columns vary by only a
single bit, for example, 00, 01, 11, and 10. This is
necessary to observe the variable transitions
– Known as a gray code
Multiple Inputs K-Map
K-Map Method

• The Karnaugh Map (K-Map) method uses a simple


procedure for minimizing Boolean functions.
– The map is a diagram made up of squares with each square
representing one minterm of the function.
– The key is to learn to identify visual patterns.
– The result is always an expression that is in one of the two standard
forms, SOP or POS.
– Much faster and more more efficient than previous minimization
techniques with Boolean algebra.
– It is possible to find two or more expressions that satisfy the
minimization criteria.
– Rules to consider
Every cell containing a 1 must be included at least once.
The largest possible “power of 2 rectangle” must be enclosed.
The 1’s must be enclosed in the smallest possible number of rectangles.
Two-Variable Map

• A two-variable map
holds four minterms for
two variables.
– We mark the squares of the
minterms that belong to a
given function.
Representing 2-Variable Functions

• K-Map for AND • K-Map for OR


Three-Variable Map

• A three-variable map
holds eight minterms for
three variables.
– Again, we mark the squares
of the minterms that belong
to a given function.
– Note that the sequence is not
arranged in a binary way.
– The sequence used, similar
to Gray code, allows only one
bit to change from column to
column and row to row.
Three-Variable Map
Mapping Functions

• When you have already been provided a function, you


can map the function into a K-map by remembering
– the cells of a k-map represent minterms
– a 1 in a cell indicates that the minterm is part of the function
– two adjacent 1’s represent a two literal term
– four adjacent 1’s represent a one literal term
– eight adjacent 1’s represent a true function, F = 1
Minimization Characteristic in 3-Variable Maps

• Since any two adjacent cells in a 3-variable map


represent a change in only a single bit, we use this to
do minimization.
– Consider the two cells for m0 and m1 where the difference is the
negation of the bit z.
– F = m0 + m1 = x’y’z’ + x’y’z = x’y’(z’ + z) = x’y’
Z

Y
Minimization Example

• Each of the two adjacent pairs of entries can be


simplified by eliminating the changing bit (z in both
cases). Z
– F (x,y,z) = x’y’ + xy

Y
Note on Adjacency

• So far, we have assumed that adjacent cells in the


map need to touch each other but this is not always
the case.
– m0 and m2 are considered adjacent
» m0 + m2 = x’y’z’ + x’yz’ = x’z’(y’ + y) = x’z’
– m4 and m6 are considered adjacent
» m4 + m6 = xy’z’ + xyz’ = xz’(y’ + y) = xz’
Z

Y
Another Example

• The four adjacent squares can be combined to give


the single literal term z’
• The remaining single term is combined with the
adjacent square that was already used to give us the
term x’y’
• F = z’ + x’y’ Z

Y
3-Variable Map Patterns

• The number of adjacent squares that may be


combined always represent a number that is a power
of 2 such as 1, 2, 4, and 8.
– One square represents one minterm with three literals.
– Two adjacent squares represents a term of two literals.
– Four adjacent squares represents a term of one literal.
– Eight adjacent squares represents the entire map and produces a
function that is always equal to 1.
Mapping Functions (Example)

• Given the function


– F = x’z + xy’ + xy’z + yz
• Map the function
• Determine the sum of minterms equation
• Determine the minimum sum of products expression

1 1
x 1 1 1

• Sum of minterms: F = ∑(1, 3, 4, 5,


Y 7)
• Minimum sum of products: F = z + xy’
Another Minimization Example

• Each of the two adjacent pairs of entries can be


simplified by eliminating the changing bit.
– x is eliminated in column 2
– y is eliminated in the other pair.
– F = y’z + x’z’
Another Minimization Example

• Two variable maps.


– F=AB +AB +AB

B
0 1
A
0 0 1
1 1 1 F=A+B
• Three variable maps.
– F=AB’C’ +AB C +ABC +ABC  + A’B’C + A’BC’

BC
00 01 11 10
A
0 0 1 0 1
1 1 1 1 1 F=A+B C +BC 
Another Minimization Example

a
b 0 1 a
0 0 1 b 0 1
1 0 1 0 1 1
1 0 0
f=a
g = b'
ab ab
c 00 01 11 10 c 00 01 11 10
0 0 0 1 0 0 0 0 1 1
1 0 1 1 1 1 0 0 1 1
cout = ab + bc + ac
f=a
Example 3-1

– Simplify boolean function


F(x,y,z) = (2,3,4,5)
• Sol:
– 1 is marked in each minterm
that represents the function
– Find the possible adjacent
squares and mark them with
rectangles
– The upper right rectangle
represents the area
enclosed closed by x’y
(eliminating the changing
bit)
– Similarly lower left
rectangle represents xy’
– The logical sum of these
two terms gives:
F = x'y + xy'
Example 3-2

– F(x,y,z) = (3,4,6,7)
• Sol:
– 1 is marked in each minterm
that represents the function
– Find the possible adjacent
squares and mark them with
rectangles
– Two adjecent squares are
combined in the third
column to give a two-literal
term yz
– The remaining two squares
with 1’s are enclosed in half
rectangles. This gives two-
literal term xz’
– The logical sum of these
two terms gives:
F = yz + xz’
Example 3-3
– F(x,y,z) = (0,2,4,5,6)
• Sol:
– 1 is marked in each minterm
that represents the function
– Find the possible adjacent
squares and mark them with
rectangles
– We combine four adjacent
squares to get a single literal
term z’ as m0+m2+m4+m6
= x'y'z'+x'yz'+xy'z'+xyz‘
= x'z'(y'+y) +xz'(y'+y)
= x'z' + xz‘ = z'
– The remaining two squares
with 1’s are enclosed by a
rectangle (with one square that
is already used once). This
gives two-literal term xy’
– The logical sum of these two
terms gives:
F = z’ + xy’
Example 3-4
– F = A'C + A'B + AB'C + BC
– express it in sum of minterms
find the minimal sum of
products expression
• Sol:
– The two squares corresponding
to the first term A’C. (A’ first
row and C two middle columns)
– A’B has 1’s in squares 011 and
010 in the same way
– AB’C has 1 square 101 and BC
has two 1’s in squares 011 and
111
– The function has total of 5
minterms as shown in figure
– Find the possible adjacent
squares and mark them with
rectangles as shown in the map
– It can be simplified with only
two terms giving:
F = C + A’B
Four-Variable Map

• A four-variable map holds


16 minterms for four
variables.
– Again, we mark the squares
of the minterms that belong
to a given function.
– Note that the sequence is not
arranged in a binary way.
– The sequence used is a Gray
code and allows only one bit
to change from column to
column and row to row.
4-Variable Map
4-Variable Map Patterns

• The number of adjacent squares that may be


combined always represent a number that is a power
of 2 such as 1, 2, 4, 8, and 16.
– One square represents one minterm with four literals.
– Two adjacent squares represents a term of three literals.
– Four adjacent squares represents a term of two literals.
– Eight adjacent squares represents a term of one literal.
– Sixteen adjacent squares represents the entire map and produces a
function that is always equal to 1.
Minimization Example

• The eight adjacent squares can be combined to form


the one literal term y.
• Four adjacent squares can be combined to form the
two literal term wz’.
• F = y + wz’
Another Example

• Four adjacent corners can be combined to form


the two literal term x’z’.
• Four adjacent squares can be combined to form
the two literal term x’y.
• The remaining 1 is combined with a single
adjacent 1 to obtain the three literal term w’y’z’.
• F = x’z’ + x’y + w’y’z’
Another Example

• F=ABC +ACD +ABC+AB CD +ABC +AB C

CD
00 01 11 10
AB
00 0 0 0 1
01 1 1 0 1
11 1 1 1 1 F=BC +CD + AC+ AD 
10 1 0 1 1
Another Example

• F(A,B,C,D) = m(0,3,5,8,9,10,11,12,13,14,15)
– F = C + A’BD + B’D’
C + A’BD + B’D’

A 1111
0111
1 0 0 1

0 1 0 0
D
C
1 1 1 1 D
A
C 1000
1 1 1 1 0000 B
B

Solution set can be considered as a coordinate


System!
Another Example

A A A
0 0 0 0 1 0 0 0 0 1 1 1

1 0 0 0 0 1 0 0 0 0 1 1
D D D
1 1 0 1 0 0 1 0 0 0 0 0
C C C
1 1 0 0 0 0 0 1 0 0 1 0
B B B

K-map for LT K-map for EQ K-map for GT

LT = A' B' D + A' C + B' C D


EQ = A'B'C'D' + A'BC'D + ABCD + AB'CD’
GT = B C' D' + A C' + A B D'
Example 3-5
– F(w,x,y,z) =
(0,1,2,4,5,6,8,9,12,13,14)
• Sol:
– 1 is marked in each minterm
that represents the function
– Find the possible adjacent
squares and mark them with
rectangles
– We combine eight adjacent
squares to get a single literal
term y’
– The top two 1’s on the right
are combined with the top
two 1,son the left to give the
term w’z’
– We combine the single
square left on right with three
adjecent squares that are
already used to give the term
xz’
– The logical sum of these
three terms gives:
F = y’ + w’z’+xz’
Example 3-6
– F=
A’B’C’+B’CD’+A’BCD’+AB’C’
• Sol:
– Each of three literal term in
map is represented by two
squares and four literal term
in map is represented by one
square
– We combine the 1’s in the four
corners to give the term B’D’
– The two left hand 1’s in the
top row are combined with
two 1’s in the bottom row to
give the term B’C’
– The remaining 1’s may be
combined in the two-square
area to give the term A’CD’
– The logical sum of these three
terms gives:
F = B’D’ + B’C’+ A’CD’
Prime Implicants

• A prime implicant is a product term obtained by


combining the maximum possible number of adjacent
squares in the map.
– A single 1 on a map represents a prime implicant if it is not adjacent
to any other 1.
– Two adjacent 1’s form a prime implicant, provided they are not
within a group of four adjacent squares.
– Four adjacent 1’s form a prime implicant if they are not within a
group of eight adjacent squares, and so on.
• If a minterm in a square is covered by only one prime
implicant, that prime implicant is said to be essential.
– They are found by looking at each square marked with a 1 and
checking the number of prime implicants that cover it. Those with
only one prime implicant are essential.
Example of Prime Implicants

• Two essential prime implicants (caused by m0 and m5)


– This gives us two terms: x’z’ and xz
• Finding prime implicants for the remainders results in
four expressions:
– F = xz + x’z’ + yz + wz
– F = xz + x’z’ + yz + wx’
– F = xz + x’z’ + x’y + wz
– F = xz + x’z’ + x’y + wx’

You might also like