Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3. Minimization of Switching Functions. Given a sw function f(x 1, x 2, …, x n ) and some cost criteria, find a representation of f which minimizes.

Similar presentations


Presentation on theme: "Chapter 3. Minimization of Switching Functions. Given a sw function f(x 1, x 2, …, x n ) and some cost criteria, find a representation of f which minimizes."— Presentation transcript:

1 Chapter 3. Minimization of Switching Functions

2 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. 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 : 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

3 o x 011 001 110 100 010 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(x 1,x 2,x 3 ) =  (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(x 1,x 2,…,x n ) 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 x i-1 =a 1, x i-2 =a 2, …, x i n-r =a n-r Then, the product term x * i-1 x * i-2 … x * i n-r,where x * ij = x ij, if a j =1 is called an implicant of f. x ’ ij, if a j =0

4 An implicant is a prime implicant (P.I.) iff it is not covered by any other implicant of the function. Eg) previous vertices, implicant x 2 ’ x 3 ’ P.I.’s x 2 ’ x 3 ’ x 1 ’ x 3 ’ x 1 ’ x 1 ’ x 2 ’ x 1 ’ x 3 x 1 ’ x 2 x 1 ’ A P.I. is an essential P.I. iff itcovers some vertex not covered by any other prime implicant. Eg) f(x 1,x 2,x 3 ) =  (0,2,3,4,7) 011 001 110 100 010 000 111 Implicant : x 2 ’ x 3 ’, x 1 ’ x 3 ’, x 1 ’ x 2, x 2 x 3 P.I. : x 2 ’ x 3 ’, x 1 ’ x 3 ’, x 1 ’ x 2, x 2 x 3 Essential P.I. : x 2 ’ x 3 ’, x 2 x 3 Any minimal sum of product expression contains only prime implicants, any minimal sum of product expression must contain all essential PI.

5 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 gx i +gx i ’ =g(x i +x i ’ )=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.

6 Ex) f(x 1,x 2,x 3,x 4 ) =  (0,1,2,5,6,7,8,9,10,13,15) Using prime implicant chart, we can find essential PI 1 1 15 (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 5 6 9 10 0 - 0 1 - 0 0 1 0 - 1 0 - 0 1 0 1 0 0 - 1 0 - 0 - 1 1 1 1 1 - 1 (13,15) (7,15)                 128128 (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 x 1,x 2,x 3,x 4 # 0 0 0 1 1 0 0 0 0 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                

7 The essential PI’s are (0,2,8,10) and (5,7,13,15). So, f(x 1,x 2,x 3,x 4 ) = (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 p j dominates PI p k iff every minterm covered by p k is also covered by p j. pjpkpjpk m 1 m 2 m 3 m 4      (can remove) Branching method p1p2p3p4p5p1p2p3p4p5 m 1 m 2 m 3 m 4 m 5           If we choose p 1 first, then p 3, p 5 are next. p1p1 p4p4 p3p3 p5p5 p3p3 p2p2 Quine – McCluskey method (no limitation of the # of variables)   

8 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(x 1, x 2,, x n ) is the function f d obtained by interchanging all and + operation and all constants 0 and 1 which appear in the expression f d (x 1, x 2,, x n ) = f ’ (x 1 ’, x 2 ’,, x n ’ ) A function is self-dual iff f d (x 1, x 2,, x n ) = f(x 1, x 2,, x n ) Eg) f(x 1, x 2, x 3 ) = x 1 ’ x 2 ’ +x 1 ’ x 3 +x 2 ’ x 3 f d (x 1, x 2, x 3 ) = (x 1 ’+x 2 ’)(x 1 ’+x 3 )(x 2 ’+x 3 ) = (x 1 ’+x 1 ’x3+x 1 ’x 2 ’+x 2 ’x 3 )(x 2 ’+x 3 ) = (x 1 ’+x 2 ’x 3 )(x 2 ’+x 3 ) = x 1 ’x 2 ’+x 1 ’x 3 +x 2 ’x 3 +x 2 ’x 3 (self-dual)

9 A function f(x 1, x 2,, x n ) is positive-unate ( monotonic) iff f(a 1, a 2,, a n ) =1 implies f(b 1, b 2,, b n ) =1 for all (b 1, b 2,, b n )  (a 1, a 2,, a n )  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 a 0 ⊕ a 1 x 1 ⊕ a 2 x 2 ⊕ ⊕ a n x n, where ai  {0,1} for 110 011 001 100 010 000 111 101


Download ppt "Chapter 3. Minimization of Switching Functions. Given a sw function f(x 1, x 2, …, x n ) and some cost criteria, find a representation of f which minimizes."

Similar presentations


Ads by Google