chapter 3. minimization of switching functions. given a sw function f(x 1, x 2, …, x n ) and some...
TRANSCRIPT
Chapter 3.
Minimization of Switching Functions
Given a sw function f(x1, x2, … , xn) and some cost criteria, find a representation of f which minimizes the given cost criteria.
Cost criteria : minimize the number of terms and literals per term.Literal : complemented or uncomplemented appearance of var. Term : sum of product of literal.
Minimal : minimum number of terms with the minimum number of literals.
Minimization method
1) algebraic method : <e.g.> f(x,y,z) = xyz + xyz + xyz + xyz + xyz + xyz
= xz + yz + yz + xz
2) Map method adjacent state ( only single var. diff.)
111 1
111 0
10110100 xy z
o
x
011
001
110
100010
000
3) Tabular Method (Quine-McCluskey method)
A sum of product expression for a function f is oReducible : if sum of the product terms can be deleted without changing the function realized.
oIrreducible : not reducible.
oMinimal : minimize the cost criteria.
irreducible minimal
f(x1,x2,x3) = (0,1,2,3,4)
For an n variables, consider all true vertices for which one particular position of the n - tuple is constant at value for = 0 or 1. These true vertices from an (n-1) cube. The set of all true vertices constant in m position forms (n-m) cube. Consider f(x1,x2,…,xn) on the n cube, then for an r cube(r<n) at the n-cube, which corresponds entirely to true vertices of n-cube, say the r-cube defined by
xi-1=a1, xi-2=a2, … , xi n-r=an-r
Then, the product term x*i-1 x*
i-2… x*i n-r ,where x*
ij = xij, if aj=1 is called an implicant of f. x’
ij, if aj=0
An implicant is a prime implicant (P.I.) iff it is not covered by any other implicant of the function.
Eg) previous vertices,
implicant x2’x3
’ P.I.’s x2’x3
’
x1’x3
’ x1’
x1’x2
’
x1’x3
x1’x2
x1’
A P.I. is an essential P.I. iff it covers some vertex not covered by any other prime implicant.Eg) f(x1,x2,x3) = (0,2,3,4,7)
011
001
110
100010
000
111 Implicant : x2’x3
’, x1’x3
’, x1’x2, x2x3
P.I. : x2’x3
’, x1’x3
’, x1’x2, x2x3 Essential
P.I. : x2’x3
’ , x2x3
Any minimal sum of product expression contains only prime implicants, any minimal sum of product expression must contain all essential PI.
Procedure for minimal expression
1. Determine all essential PI’s and include them in the minimal expression. If all essential PI’s cover all minterms, then a unique minimal expression is
found.
2. Remove from the list of PI all those minterms which are covered by essential PI’s.
3. Select additional PI so that f is covered completely and the total # and size of the PI’s added are minimal.
Quine-McCluskey (tabular) method.
1. Arrange all minterms in group such that all terms in the same group have the same # of 1’s in their binary representation.
2. Compare every term of the lowest-index group with each term in the successive group. Whenever possible, combine two terms being compared by means of gxi+gxi
’=g(xi+xi’)=g. Two terms from adjacent groups are combinable if their
binary representation differ by just a single digit in the same position (from all 1-cube).
3. The process continues until no further combinations are possible. The remaining unchecked terms constitute the set of PI.
Ex) f(x1,x2,x3,x4) = (0,1,2,5,6,7,8,9,10,13,15)
Using prime implicant chart, we can find essential PI
1 1 1 115
(5,7) (5,13) (6,7) (9,13)
0 1 - 1 - 1 0 1 0 1 1 - 1 - 0 1
0 1 1 1 1 1 0 1
7 13
(1,5) (1,9) (2,6)
(2,10) (8,9)
(8,10)
0 1 0 1 0 1 1 0
1 0 0 1
1 0 1 0
5 6 9
10
0 - 0 1 - 0 0 1 0 - 1 0 - 0 1 0 1 0 0 - 1 0 - 0
- 1 1 11 1 - 1 (13,15)
(7,15)
1 2 8
(0,1,8,9) (0,2,8,10) (1,5,9,13)
(5,7,13,15)
- 0 0 - - 0 - 0 - - 0 1 - 1 - 1
(0,1)
(0,2)
(0,8)
0 0 0 -
0 0 - 0
- 0 0 0
0 0 0 00
x1,x2,x3,x4x1,x2,x3,x4x1,x2,x3,x4x1,x2,x3,x4#
0 0 0 1
1 0 0 00 0 1 0
(2,6) (6,7)
(0,1,8,9) (0,2,8,10) (1,5,9,13)
(5,7,13,15)
0 1 2 5 6 7 8 9 10 13 15
The essential PI’s are (0,2,8,10) and (5,7,13,15) . So, f(x1,x2,x3,x4) = (0,2,7,8) + (5,7,13,15) + PI’s
Here are 4 different choices (2,6) + (0,1,8,9), (2,6) + (1,5,9,13) (6,7) + (0,1,8,9), or (6,7) + (1,5,9,13)
(2,6)
(6,7)
(0,1,8,9)
(1,5,9,13)
1 6 9
The reduced PI chart
A PI pj dominates PI pk iff every minterm covered by pk is also covered by pj.
pj pk
m1 m2 m3 m4
(can remove)
Branching method
p1 p2
p3 p4 p5
m1 m2 m3 m4 m5
If we choose p1 first, then p3, p5 are next.
p1
p4p3
p5
p3p2
Quine – McCluskey method (no limitation of the # of variables)
A set of logical primitives that can be used to realize any combinational function is called logically complete.
Strongly complete : if any combinational function including the constant 0 and 1 can be realized by interconnecting a finite number of primitives from the set, assuming only the uncomplemented variables are available as input.
Weakly complete : if the primitives together with constants 0 and 1 can realize any combinational function.
Strongly complete : NAND, NOR, (AND, NOT) Weakly complete : ( ) ring sum expression⊕
A function is zero-preserving if f(0,0,•••,0) = 0A function is one-preserving if f(1,1,•••,1) = 1
The dual of a function f(x1, x2, ••• , xn) is the function fd obtained by interchanging all • and + operation and all constants 0 and 1 which appear in the expression
fd (x1, x2, ••• , xn) = f’(x1’, x2
’, ••• , xn’)
A function is self-dual iff fd (x1, x2, ••• , xn) = f(x1, x2, ••• , xn)
Eg) f(x1, x2, x3) = x1’x2
’+x1’x3+x2
’x3 fd (x1, x2, x3) = (x1’+x2’)(x1’+x3)(x2’+x3) = (x1’+x1’x3+x1’x2’+x2’x3)(x2’+x3)
= (x1’+x2’x3)(x2’+x3) = x1’x2’+x1’x3+x2’x3+x2’x3 (self-dual)
A function f(x1, x2, ••• , xn) is positive-unate ( monotonic) iff
f(a1, a2, ••• , an) =1 implies f(b1, b2, ••• , bn) =1 for all
(b1, b2, ••• , bn) (a1, a2, ••• , an) negative unate
f = (2,3,6,7) positive-unate if (001) = 1 then (011, 101, 111) also have 1 f = (1,3,5,7) positive-unate but f = (1,5,7) not positive-unate
A function is linear iff its ringsum expression is of the form
a0 a⊕ 1x1 a⊕ 2x2 ⊕ ••• a⊕ nxn, where ai {0,1} for
110011
001 100010
000
111
101
ni0