Presentation is loading. Please wait.

Presentation is loading. Please wait.

Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the.

Similar presentations


Presentation on theme: "Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the."— Presentation transcript:

1 Two Level Networks

2 Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the implementation of the original to the final representation

3 Two-Level Networks Slide 3 Don’t Care Conditions In practice there are combinations that will never occur we may pick the most convenient assignment A BCD input is greater than 5 ABCDF 00000 00010 00100 00110 01000 01010 01101 01111 ABCDF 10001 10011 1010- 1011- 1100- 1101- 1110- 1111- F =  m(6,7,8,9)+  d(10,11,12,13,14,15) don’t cares = 0 F=  ABC + A  B  C don’t cares = 1 F= BC + A

4 Two-Level Networks Slide 4 Karnaugh Map BC 00011110 A0m0m1m3m2 1m4m5m7m6 ABCF 0000 0011 0100 0111 1000 1011 1101 1111 BC 00011110 A00110 10111 F = C + AB Adjacent cells are at Hamming distance 1

5 Two-Level Networks Slide 5 Examples F =  m(1,4,5)+  d(0) F =  m(0,3,5,6) F =  m(0,2,3,4,5,7)

6 Two-Level Networks Slide 6 4-variable Karnaugh Maps CD 00011110 AB 00 m0m1m3m2 01 m4m5m7m6 11 m12m13m15m14 10 m8m9m11m10 F =  m(1,4,5,6,14)+  d(3,7) F =  m(0,4,5,6,9,12,13) F =  m(0,2,5,6,7,8,10,13)

7 Two-Level Networks Slide 7 Prime Implicants Given two logic functions f and g, if g(x) = 1 for all x such that f(x) = 1, then g contains f, denoted f ≤ g. If a logic function f contains a product c, then c is an implicant of f. Furthermore, if c is a minterm, then c is a minterm of f. A product P is a sub-product of Q, if all the literals in P also appear in Q. Let P be an implicant of a logic function f. If no other implicant Q of f is a sub-product of P, then P is a prime implicant (PI) of f.

8 Two-Level Networks Slide 8 Prime Implicants in K maps largest blocks (loops) of 2 i 1-cells (may include don’t care cells) Show examples

9 Two-Level Networks Slide 9 Minimum SOP Consider an SOP that consists of PIs. If any SOP that is obtained by removing any of the PIs does not represent the original function f, then the original SOP is an irredundant sum-of-product expression (ISOP) of f. Among the ISOPs for f, one with the minimum number of products is a minimum sum-of-product expression (MSOP). Among the MSOPs for f, one with the minimum number of literals is a exact minimum sum-of-product expression (exact MSOP) of f. Let m be a minterm of a logic function f. If only one PI of f covers m, the m is a distinguished minterm. Among all the PIs of f, if there is only one that covers m, then it is an essential prime implicant.

10 Two-Level Networks Slide 10 Example F =  m(2,5,6,7,10,11) F =  ABD +  ABC +  AC  D +  BC  D + A  BC (SOP) F =  ABD +  ABC +  BC  D + A  BC (ISOP) F =  ABC +  AC  D + A  BC (MSOP)

11 Two-Level Networks Slide 11 Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: –Identify prime implicants (implicant tables) –Identify minimal cover (cover tables) All work is done in tabular form –Number of variables is not a limitation It does affect the size of the table –Basis for many computer implementations Proper organization and term identification are key factors for correct results

12 Two-Level Networks Slide 12 Quine-McCluskey Minimization Minterms are initially listed one per line in groups –Each group contains terms with the same number of true and complemented variables –Terms are listed in numerical order within group Terms and implicants are identified using one of three common notations –full variable form –cellular form –1,0,- form

13 Two-Level Networks Slide 13 Notation Forms Full variable form - variables and complements in algebraic form –hard to identify when adjacency applies –very easy to make mistakes Cellular form - terms are identified by their decimal index value –Easy to tell when adjacency applies; indexes must differ by power of two (one bit) –Implicants identified by term nos. separated by comma; differing bit pos. in () following terms

14 Two-Level Networks Slide 14 Notation Forms (cont.) 1,0,- form - terms are identified by their binary index value –Easier to translate to/from full variable form –Easy to identify when adjacency applies, one bit is different –- shows variable(s) dropped when adjacency is used Different forms may be mixed during the minimization

15 Two-Level Networks Slide 15 Example of Different Notations F(A, B, C, D) =  m(4,5,6,8,10,13) 1ABCD 40100 ABCD 81000 2ABCD 50101 ABCD 60110 ABCD101010 3ABCD131101 Full variable Cellular 1,0,-

16 Two-Level Networks Slide 16 Implication Table Quine-McCluskey Method –Tabular method to systematically find all prime implicants –ƒ(A,B,C,D) = Σ m(4,5,6,8,9, 10,13) + Σ d(0,7,15) –Part 1: Find all prime implicants –Step 1: Fill Column 1 with active-set and DC-set minterm indices. Group by number of true variables. Implication Table Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 NOTE: DCs are included in this step!

17 Two-Level Networks Slide 17 Minimization - First Pass Quine-McCluskey Method –Tabular method to systematically find all prime implicants –ƒ(A,B,C,D) = Σ m(4,5,6,8,9,10,13) + Σ d(0,7,15) –Part 1: Find all prime implicants –Step 2: Apply Adjacency - Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0-00 0000 vs. 1000 yields -000 When used in a combination, mark with a check. If cannot be combined, mark with a star. These are the prime implicants. Repeat until nothing left. Implication Table Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 Column II 0-00 -000 010- 01-0 100- 10-0 01-1 -101 011- 1-01 -111 11-1

18 Two-Level Networks Slide 18 Minimization - Second Pass Implication Table Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 Column II 0-00 * -000 * 010- 01-0 100- * 10-0 * 01-1 -101 011- 1-01 * -111 11-1 Column III 01-- * -1-1 * Quine-McCluskey Method –Step 2 cont.: Apply Adjacency - Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0-00 0000 vs. 1000 yields -000 When used in a combination, mark with a check. If cannot be combined, mark with a star. These are the prime implicants. Repeat until nothing left.

19 Two-Level Networks Slide 19 Prime Implicants Prime Implicants: X101 0111 0XX0 0101 AB 000111 01 11 10 C CD A D B 00 10

20 Two-Level Networks Slide 20 Stage 2: find smallest set of prime implicants that cover the active-set recall that essential prime implicants must be in final expression Prime Implicants (cont.) Prime Implicants: X101 0111 0XX0 0101 AB 000111 01 11 10 C CD A D B 00 10

21 Two-Level Networks Slide 21 rows = prime implicants columns = ON-set elements place an "X" if ON-set element is covered by the prime implicant Coverage Chart 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X Coverage Table Note: Don’t include DCs in coverage table; they don’t have to be covered by the final logic expression!

22 Two-Level Networks Slide 22 Coverage Table (cont.) rows = prime implicants columns = ON-set elements place an "X" if ON-set element is covered by the prime implicant If column has a single X, than the implicant associated with the row is essential. It must appear in minimum cover 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X Coverage Chart

23 Two-Level Networks Slide 23 Coverage Table (cont.) Eliminate all columns covered by essential primes 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X

24 Two-Level Networks Slide 24 Coverage Table (cont.) Eliminate all columns covered by essential primes Find minimum set of rows that cover the remaining columns 0,4(0-00) 0,8(\000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4XX4XX 5XX5XX 6X6X 8XXX8XXX 9XX9XX 10 X 13 X

25 Two-Level Networks Slide 25 Cover Table Reduction 1.Detection of essential rows 2.Elimination of dominated rows 3.Elimination of dominated columns 4.Detection of Pseudo-essential rows 5.repeat step 2 to 4 while reductions are possible

26 Two-Level Networks Slide 26 Solution Methods for Cyclic Tables Example F =  m(0,2,3,4,5,7) naïve algorithm 1.Assume that a row is in the final solution, reduce the covering, and obtain a minimum cover 2.Assume that a row is not in the final solution, reduce the covering, and obtain a minimum cover 3.select the lower from (1) and (2)

27 Two-Level Networks Slide 27 Branch and Bound 1.Branch a)Choose one row from the covering table. Let it be A. b)Assume A is in the final solution---find minimal cover c)Assume A is not in the final solution---find minimal cover d)Select smaller of (b) and (c) 2.Bound a)if the cost of the solution is equal to the lower bound of the cost of the minimum cover, then stop the search. b)if the solution of the current problems cannot be better than the best solution found, then stop the search.

28 Two-Level Networks Slide 28 Algebraic Method for Cyclic Tables mama mbmb mcmc mdmd meme P1P1 XXX P2P2 XX P3P3 XX P4P4 XX P5P5 XX P6P6 XX Let g i = 1 iff P i is present in the SOP

29 Two-Level Networks Slide 29 Algebraic Method for Cyclic Tables P 1 + P 5 is the MSOP


Download ppt "Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the."

Similar presentations


Ads by Google