90 likes | 186 Views
Chapter 3 . Minimization of Switching Functions. xy z. 00. 01. 11. 10. 0. 1. 1. 1. 1. 1. 1. 1. Given a sw function f (x 1 , x 2 , … , x n ) and some cost criteria, find a representation of f which minimizes the given cost criteria.
E N D
xy z 00 01 11 10 0 1 1 1 1 1 1 1 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.)
110 011 x o 010 100 001 000 • 3) Tabular Method (Quine-McCluskey method) • A sum of product expression for a function f is • Reducible : if sum of the product terms can be deleted without changing the function realized. • Irreducible : not reducible. • Minimal : 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) 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. 110 011 010 001 100 000
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.
# x1,x2,x3,x4 x1,x2,x3,x4 x1,x2,x3,x4 x1,x2,x3,x4 0 0 0 0 0 0 0 0 - 0 0 - 0 - 0 0 0 (0,1) (0,2) (0,8) - 0 0 - - 0 - 0 - - 0 1 - 1 - 1 (0,1,8,9) (0,2,8,10) (1,5,9,13) (5,7,13,15) 1 2 8 0 0 0 1 0 0 1 0 1 0 0 0 0 - 0 1 - 0 0 1 0 - 1 0 - 0 1 0 1 0 0 - 1 0 - 0 (1,5) (1,9) (2,6) (2,10) (8,9) (8,10) Using prime implicant chart, we can find essential PI 5 6 9 10 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 0 1 2 5 6 7 8 9 10 13 15 7 13 0 1 1 1 1 1 0 1 (5,7) (5,13) (6,7) (9,13) 0 1 - 1 - 1 0 1 0 1 1 - 1 - 0 1 (2,6) (6,7) (0,1,8,9) (0,2,8,10) (1,5,9,13) (5,7,13,15) 15 1 1 1 1 (7,15) - 1 1 1 (13,15) 1 1 - 1 Ex) f(x1,x2,x3,x4) = (0,1,2,5,6,7,8,9,10,13,15)
The reduced PI chart 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) 1 6 9 (2,6) (6,7) (0,1,8,9) (1,5,9,13) A PI pj dominates PI pk iff every minterm covered by pk is also covered by pj. m1 m2 m3 m4 pj pk (can remove) Branching method If we choose p1 first, then p3, p5 are next. m1 m2 m3 m4 m5 p1 p5 p1 p2 p3 p4 p5 p3 p4 p2 p3 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) = 0 A 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)
111 101 110 011 010 100 001 000 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⊕ a1x1 ⊕ a2x2 ⊕ ••• ⊕ anxn, where ai {0,1} for