Presentation is loading. Please wait.

Presentation is loading. Please wait.

Function Minimization Algorithms

Similar presentations


Presentation on theme: "Function Minimization Algorithms"— Presentation transcript:

1 Function Minimization Algorithms
Chapter 4 Function Minimization Algorithms Techniques other than K-map. Particularly useful for larger problems.

2 Quine-McCluskey Method for Generating Prime Implicants
Write minterms using binary values. Group minterms by the number of 1’s Apply adjacency (a b´ + a b = a) to each pair of terms, forming a second list. Check those terms in the first list that are covered by the new terms. Note that only terms in adjacent groups (that differ by one 1) need be paired. Repeat process with second list (and again if multiple terms are formed on a third list).

3 A + B = J A + C = K B + D = L B + C = M C + E = N D + F = O F + H = P G + H = Q Then J + N =R K + M = R Prime Implicants L = w’xy’ O = w’xz P = xyz Q = wyz R = y’z’ Don’t cares must be included in first column. Prime implicants are the combined terms that remain, And have not been checked

4 The iterated consensus algorithm for single functions is as follows:
1. Find a list of product terms (implicants) that cover the function. Make sure that no term is equal to or included in any other term on the list. (These terms could be prime implicants or minterms or any other set of implicants. However, the rest of the algorithm proceeds more quickly if we start with prime implicants.) 2. For each pair of terms, ti and tj (including terms added to the list in step 3), compute ti ¢ tj. 3. If the consensus is defined, and the consensus term is not equal to or included in a term already on the list, add it to the list. 4. Delete all terms that are included in the new term added to the list. 5. The process ends when all possible consensus operations have been performed. The terms remaining on the list are ALL of the prime implicants.

5 MAKE A PI TABLE. $=# gates= # literals + OR OBJ: find min # rows so all cols has at least 1 X; minterms covered Find essential PI – only 1 X in col This is C & E, they are shaded Check off all other mins that are covered by those terms Make reduced table of cols not covered This is the don’t cares after PI used A row is dominated if another row covers the minterm at no more cost. PI D covers all the remain non-used F = C + D + E = wyz + y’z’ + w’xz

6 Get PI from k-map or QM F(a,b,c,d) = Σm(1,3,4,6,7,9,11,12,13,15) Construct a table of all PI Remove essential PI & all minterms (cols) covered Each row has 2 x’s Each col has 2 x’s B & C are cheaper, so try to use them A is essential E (or F) covers 4, pick E & get 12 Then C dominates D to get 13 & 15 The G covers 6 & 7 F = A + E + C + G

7 A + C + E + G A + F + B + D F = Σm(1,3,4,6,7,9,11,12,13,15) EX 4.5
Use k-map, QM, iterated consensus to find PI and make PI table. EX 4.5 $ 1 3 4 6 7 9 11 12 13 15 b’d* -0-1 A x cd --11 B ad 1—1 C abc’ 110- D bc’d’ -100 E a’bd’ 01-0 F a’bc 011- G Reduced table has 2 x in each row 2 x in each column need 3 terms Use B & C if possible They cost less. Two different ways Each use less cost term $ 4 6 7 12 13 15 3 B x C D E F G A + C + E + G A + F + B + D

8 Petrick’s Method A third tool for reducing a function.
1. Use reduced table after essential PI, but before dominated rows. 2. Create a POS expression by using 1 term for each column in the reduced table. Combine the terms to get a SOP form. Select any term that has less literals as the PI to be used. Add the essential PI to get the result. $ 4 6 7 12 13 15 3 B x C D E F G (E + F )(F + G)(B + G)(D + E)(C + D)(B + C) = (F + EG)(B + CG)(D + CE) = (BF + BEG + CFG + CEG)(D + CE) = BDF + BDEG + CDFG + CDEG + BCEF + BCEG + CEFG + CEG A + C + E + G Same result as before. F = A + C & E & G) F = A + (B & D & F) A + F + B + D

9 Sec 4.4: Q-M for multiple outputs
f(a, b, c) = ∑m(2, 3, 7) g(a, b, c) = ∑m(4, 5, 7) Convert the decimal to binary Also note the literal equivalent Add a column for the output using a tag a b c 1 1 1 m literals tag binary f g 2 a´ b c´ g´ – 0 3 a´ b c g´ – 0 4 a b´ c´ f´ – 5 a b´ c f´ – 7 a b c – – Tag for multiple outputs f g if included 0 if not included Create Q-M chart from the rows. Reduce the chart to get data for a PI table

10 f = a´b + abc g = ab´ + abc 4.6 Found all product terms-
Create PI table w/ section for each output F=Σ(2,3,7) G=Σ(4,5,7) X only in column for implicant Essential is only one in column Cover all possible implicants Shown in brown in equations Create reduced table of uncovered Find term that covers most A →abc term The two outputs share the term So have minimum total cost f = a´b + abc g = ab´ + abc

11 Find terms that can be shared. List all minterms, with tags
Ex 4.8 f(a, b, c, d) = ∑m(2, 3, 4, 6, 9, 11, 12) + ∑d(0, 1, 14, 15) g(a, b, c, d) = ∑m(2, 6, 10, 11, 12) + ∑d(0, 1, 14, 15) Two functions Find terms that can be shared. List all minterms, with tags Group by number of 1’s Check terms that differ by only 1 The terms that can be shared do not have a check at the end a’b’c’, a’b’d’, a’cd’, bcd’, abd’, acd, abc The PI is found from the tags f PI has a blank in first col g PI has a blank in second col f PI = a’b’, a’d’, b’d, bd’ g PI = cd’, ac Tag for multiple outputs f g if included 0 if not included

12 f(a, b, c, d) = ∑m(2, 3, 4, 6, 9, 11, 12) + ∑d(0, 1, 14, 15) g(a, b, c, d) = ∑m(2, 6, 10, 11, 12) + ∑d(0, 1, 14, 15) EX 4.10 Same problem, but use k-Map Two functions Find terms that can be shared. K-map fg, list all minterms of both functions K-map f, list minterms of f, with DC K-map g, same thing Group minterms of k-map to find product terms for the 2 functions Use common terms where possible Use product terms to make PI table

13 f(a, b, c, d) = ∑m(2, 3, 4, 6, 9, 11, 12) + ∑d(0, 1, 14, 15) g(a, b, c, d) = ∑m(2, 6, 10, 11, 12) + ∑d(0, 1, 14, 15) 4.12 Continue multiple output Create 2 sections For f & g X if function is used Find essential PI Cover other PI with it Check col Make reduced PI Next page

14 4.12 Reduced PI table f(a, b, c, d) = ∑m(2, 3, 4, 6, 9, 11, 12) + ∑d(0, 1, 14, 15) g(a, b, c, d) = ∑m(2, 6, 10, 11, 12) + ∑d(0, 1, 14, 15) For g, select N It covers 11 & 10 Create another reduced Table w/o these tersm

15 f = b´d + abd´ + a´d´ g = ac + abd´ + cd´ 4.12 Reduced
Reduced PI table f(a, b, c, d) = ∑m(2, 3, 4, 6, 9, 11, 12) + ∑d(0, 1, 14, 15) g(a, b, c, d) = ∑m(2, 6, 10, 11, 12) + ∑d(0, 1, 14, 15) Continue to select terms to cover 2 & 6 covers both f & g Use that term, C Then cover the remaining PI f = b´d + abd´ + a´d´ g = ac + abd´ + cd´


Download ppt "Function Minimization Algorithms"

Similar presentations


Ads by Google