Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.

Similar presentations


Presentation on theme: "CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral."— Presentation transcript:

1 CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral

2 CMPUT 329 - Computer Organization and Architecture II2 Reading Assignment Chapter 4: Section 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8

3 CMPUT 329 - Computer Organization and Architecture II3 Cost of Implementing a Logic Circuit The cost of implementing a logic circuit is related to the number of gates used and with the number of inputs in each gate. A literal is a boolean variable or its complement. The cost of a boolean equation represented in a sum-of-products form is given by:

4 CMPUT 329 - Computer Organization and Architecture II4 Cost of Implementing a Logic Circuit

5 CMPUT 329 - Computer Organization and Architecture II5 Cost of a Logic Circuit Examples What is the cost of the following boolean equations? f1(w,x,y,z) = wxy’z + wxyz’ g1(XYZ) = XY + X’Z + YZ f2(w,x,y,z) = w’ + x’ + yz + y’z’ g2(XYZ) = XY + X’Z h1(a,b) = ab h2(a,b) = b’ C(f1) = 4+4+2=10 C(g1) = 2+2+2+3=9 C(f2) = 0+0+2+2+4=8 C(g2) = 2+2+2=6 C(h1) = 2 + 0 = 2 C(h2) = 0 + 0 = 0

6 CMPUT 329 - Computer Organization and Architecture II6 Karnaugh Maps M. Karnaugh, “The Map Method for Synthesis of Combinatorial Logic Circuits”, Transactions of the American Institute of Electrical Engineers, Communications and Electronics, Vol. 72, pp. 593-599, November 1953. and A Karnaugh Map is a graphical tool to assist on the minimization of logic equations. Similar to a truth table, a Karnaugh Map specifies a value for each combination of inputs.

7 CMPUT 329 - Computer Organization and Architecture II7 Anatomy of Karnaugh Maps A A=0 A=1 A B A=0,B=1 A=1,B=1 A=0,B=0A=1,B=0 A B C A=1,B=0,C=0 A=1,B=1,C=0 A=0,B=1,C=0 A=0,B=0,C=0 A=0,B=0,C=1A=1,B=0,C=1 A=0,B=1,C=1A=1,B=1,C=1

8 CMPUT 329 - Computer Organization and Architecture II8 Anatomy of Karnaugh Maps A B C D A Karnaugh Map for four variables. B 0000 0 0001 1 0011 3 0010 2 0100 4 0101 5 0111 7 0110 6 1100 12 1101 13 1111 15 1110 14 1000 8 1001 9 1011 11 1010 10 CD A ABCD

9 CMPUT 329 - Computer Organization and Architecture II9 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A S = A’B’Cin + A’BCin’ + AB’Cin’ + ABCin Cout = A’BCin + A B’Cin + ABCin’ + ABCin = A’BCin + ABCin + AB’Cin + ABCin + ABCin’ + ABCin = BCin + ACin + AB = (A’ + A)BCin + (B’ + B)ACin + (Cin’ + Cin)AB = 1·BCin + 1· ACin + 1· AB How to use a Karnaugh Map instead of the Algebraic simplification?

10 CMPUT 329 - Computer Organization and Architecture II10 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. A B Cin 0 0 0 111 0 1

11 CMPUT 329 - Computer Organization and Architecture II11 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout =

12 CMPUT 329 - Computer Organization and Architecture II12 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB A B Cin 0 0 0 0111 1

13 CMPUT 329 - Computer Organization and Architecture II13 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB + ACin

14 CMPUT 329 - Computer Organization and Architecture II14 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB + ACin + BCin

15 CMPUT 329 - Computer Organization and Architecture II15 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S =

16 CMPUT 329 - Computer Organization and Architecture II16 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’

17 CMPUT 329 - Computer Organization and Architecture II17 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin

18 CMPUT 329 - Computer Organization and Architecture II18 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin

19 CMPUT 329 - Computer Organization and Architecture II19 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin + AB’Cin’

20 CMPUT 329 - Computer Organization and Architecture II20 Prime Implicants Any single 1 or group of 1s in the Karnaugh map of a function F is an implicant of F. A product term is called a prime implicant of F if it cannot be combined with another term to eliminate a variable. B C A 1 1 1 11 11 1 D Example: If a function F is represented by this Karnaugh Map. Which of the following terms are implicants of F, and which ones are prime implicants of F? (a) AC’D’ (b) BD (c) A’B’C’D’ (d) AC’ (e) B’C’D’ Implicant Not an Implicant Implicant Prime Implicant

21 CMPUT 329 - Computer Organization and Architecture II21 Essential Prime Implicants A product term is an essential prime implicant of F if there is a minterm that is only covered by that prime implicant. The minimal sum-of-products form of F must include all the essential prime implicants of F. Theorem: If a minterm m j of F and all its adjacent minterms are covered by a single term p i, then p i is an essential prime implicant of F.

22 CMPUT 329 - Computer Organization and Architecture II22 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) f’(w,x,y,z) = w’ + x’ + (y’z +yz’)’ = w’ + x’ + (y’z)’(yz’)’ = w’ + x’ + (y + z’)(y’ + z) = w’ + x’ + yy’ + yz + z’y’ + z’z = w’ + x’ + 0 + yz + z’y’ + 0 = w’ + x’ + yz + y’z’ In Topic 2 we used the following algebraic transformations to solve this problem. Could it be easier with Karnaugh Maps?

23 CMPUT 329 - Computer Organization and Architecture II23 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w y xz = wxy’z + wxyz’

24 CMPUT 329 - Computer Organization and Architecture II24 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w 1 y xz = wxy’z + wxyz’ 1 1

25 CMPUT 329 - Computer Organization and Architecture II25 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w 1 1 y xz = wxy’z + wxyz’ This is the Karnaugh Map for f(w,x,y,z). How do we build the Karnaugh Map for f’(w,x,y,z)?

26 CMPUT 329 - Computer Organization and Architecture II26 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w 1 1 1 1 1 1 1 01 1 1 01 11 1 y x z Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) =

27 CMPUT 329 - Computer Organization and Architecture II27 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w 1 1 1 1 1 1 1 01 1 1 01 11 1 y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’

28 CMPUT 329 - Computer Organization and Architecture II28 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w 1 1 1 1 1 1 1 01 1 1 01 11 1 y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’

29 CMPUT 329 - Computer Organization and Architecture II29 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w 1 1 1 1 1 1 1 01 1 1 01 11 1 y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’ + yz

30 CMPUT 329 - Computer Organization and Architecture II30 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w 1 1 1 1 1 1 1 01 1 1 01 11 1 y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’ + yz + y’z’

31 CMPUT 329 - Computer Organization and Architecture II31 Examples XY + X’Z + YZ = XY + X’Z = XY + X’Z + (X + X’)YZ = XY + X’Z + XYZ + X’YZ = XY + XYZ + X’Z + X’YZ = XY(1 + Z) + X’Z(1 + Y) = XY·1 + X’Z·1 XY + X’Z + YZ = XY + X’Z + 1·YZ = XY + X’Z In Topic 2 we used the following algebraic transformations to prove the consensus theorem. Could we use Karnaugh maps to obtain such a proof?

32 CMPUT 329 - Computer Organization and Architecture II32 Examples First we need to build the Karnaugh map for the expression: XY + X’Z + YZ Y X Z 11 1 1 Now we need to write the simplified expression from the Karnaugh map. XY + X’Z

33 CMPUT 329 - Computer Organization and Architecture II33 Minimum Sum-of-products The minimum sum-of-products of a function F is formed by some, but not necessarily all, of the prime implicants of the function. B C A 1 11 1 1 11 11 D Example: Write all the prime implicants for the function g expressed as this Karnaugh Map. AB AD’ BD AC

34 CMPUT 329 - Computer Organization and Architecture II34 Minimum Sum-of-products The minimum sum-of-products of a function F is formed by some, but not necessarily all, of the prime implicants of the function. B C A 1 11 1 1 11 11 D Example: Now write the minimum sum-of-products of g. AB AD’ BD AC g = AC + AD’ + BD

35 CMPUT 329 - Computer Organization and Architecture II35 Karnaugh Maps of Product- of-sums Find the minimum sum-of-minterms form for the following function F’ = [(b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’)]’ = (b + c + d’)’ + (a + b’ + d)’ + (a’ + b + d’)’ + (a’ + b’ + c’)’ = b’c’d + a’bd’ + ab’d + abc Because F is given as a product-of-sums, it is easier to build the Karnaugh map for F’ and then complement it. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’)

36 CMPUT 329 - Computer Organization and Architecture II36 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd

37 CMPUT 329 - Computer Organization and Architecture II37 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd 11

38 CMPUT 329 - Computer Organization and Architecture II38 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a 11 b cd 1 1

39 CMPUT 329 - Computer Organization and Architecture II39 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a 1 1 1 b cd 1 1

40 CMPUT 329 - Computer Organization and Architecture II40 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a 11 1 1 1 b cd 1 1

41 CMPUT 329 - Computer Organization and Architecture II41 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a 11 1 1 1 1 1 b cd F’ a 1 1 1 1 11 1 1 1 b cd F

42 CMPUT 329 - Computer Organization and Architecture II42 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’

43 CMPUT 329 - Computer Organization and Architecture II43 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’

44 CMPUT 329 - Computer Organization and Architecture II44 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd

45 CMPUT 329 - Computer Organization and Architecture II45 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd a’bd

46 CMPUT 329 - Computer Organization and Architecture II46 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd a’bd bc’d

47 CMPUT 329 - Computer Organization and Architecture II47 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’

48 CMPUT 329 - Computer Organization and Architecture II48 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’ ac’d’ Which prime implicants are essential for F?

49 CMPUT 329 - Computer Organization and Architecture II49 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’ ac’d’ Which prime implicants are essential for F? Only b’d’ is essential. Does the set of all essential prime implicants completely define F?

50 CMPUT 329 - Computer Organization and Architecture II50 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) 1 1 1 1 11 1 1 1 b cd F a F = b’d’

51 CMPUT 329 - Computer Organization and Architecture II51 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd 1 1 1 1 11 1 1 1 b cd F a

52 CMPUT 329 - Computer Organization and Architecture II52 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd + bc’d 1 1 1 1 11 1 1 1 b cd F a

53 CMPUT 329 - Computer Organization and Architecture II53 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd + bc’d + ac’d’ 1 1 1 1 11 1 1 1 b cd F a

54 CMPUT 329 - Computer Organization and Architecture II54 Incompletely Specified Functions N1N1 w z x y N2N2 A C B F Assumption: N 1 never produces the combinations ABC = 001 and ABC = 110. Question: What value should F produce for the combinations ABC = 001 and ABC = 110 ? We don’t care!!!

55 CMPUT 329 - Computer Organization and Architecture II55 Incompletely Specified Functions (Cont.) How can we use the fact that we don’t care about the value produced by F when ABC = 001 or ABC = 110 to simplify the circuit N 2 ? = A’C’(B’ + B) + (A’ + A)BC = A’C’·1 + 1·BC = A’C’ + BC F(A,B,C) = A’B’C’ + A’BC’ + A’BC + ABC If we assume that F(0,0,1) = 0 and F(1,1,0) = 0, we obtain the following equation 0 0

56 CMPUT 329 - Computer Organization and Architecture II56 Incompletely Specified Functions (Cont.) F(A,B,C) = A’B’C’ + A’B’C + A’BC’ + A’BC + ABC’ + ABC However, if we assume that F(0,0,1) = 1 and F(1,1,0) = 1, we obtain instead the equation: = A’B’ ·1 + A’B ·1 + AB ·1 = A’B’(C’ + C) + A’B(C’ + C) + AB(C’ + C) = A’B’ + A’B + AB = A’B’ + A’B + A’B + AB = A’(B’ + B) + (A’ + A)B = A’·1 + 1·B = A’ + B 1 1 Compare this with the other solution: F(A,B,C) = A’C’ + BC. Which one is cheaper to implement?

57 CMPUT 329 - Computer Organization and Architecture II57 Incompletely Specified Functions Don’t care values are easily used to simplify incompletely specified functions. A B C 1 1 X 11X F = A’ + B

58 CMPUT 329 - Computer Organization and Architecture II58 Another Example a 1 1 1 X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd

59 CMPUT 329 - Computer Organization and Architecture II59 Another Example a 1 1 1 X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd + b’c’d’

60 CMPUT 329 - Computer Organization and Architecture II60 Another Example a 1 1 1 X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd + b’c’d’ + a’bc’

61 CMPUT 329 - Computer Organization and Architecture II61 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C D E A F =

62 CMPUT 329 - Computer Organization and Architecture II62 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C DE A F = BD’

63 CMPUT 329 - Computer Organization and Architecture II63 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C DE A F = BD’ + CDE

64 CMPUT 329 - Computer Organization and Architecture II64 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C DE A F = BD’ + CDE + A’B’DE’

65 CMPUT 329 - Computer Organization and Architecture II65 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C DE A F = BD’ + CDE + A’B’DE’ + A’CD’E’

66 CMPUT 329 - Computer Organization and Architecture II66 5-Variable Karnaugh Maps 111 11 1 1 1 111 11 11 1 BC DE 00 01 11 10 01111000 A 0 1 C B 1 11 11 1 1 1 1 D E B 111 11 1 1 C DE A F = BD’ + CDE + A’B’DE’ + A’CD’E’ + A’C’D’E’

67 CMPUT 329 - Computer Organization and Architecture II67 6-Variable Karnaugh Map A B C DE 1 1 1 X X 1 1 1 1 X X 1 X 1 X 1X 1 1 X 1 X X 1 1 11 X 1 11 X B D C E F

68 CMPUT 329 - Computer Organization and Architecture II68 6-Variable Karnaugh Map A B C DE 1 1 1 X X 1 1 1 1 X X 1 X 1 X 1X 1 1 X 1 X X 1 1 11 X 1 11 X B D C E F g = C’E’

69 CMPUT 329 - Computer Organization and Architecture II69 6-Variable Karnaugh Map A B C DE 1 1 1 X X 1 1 1 1 X X 1 X 1 X 1X 1 1 X 1 X X 1 1 11 X 1 11 X B D C E F g = C’E’ + A’CE

70 CMPUT 329 - Computer Organization and Architecture II70 6-Variable Karnaugh Map A B C DE 1 1 1 X X 1 1 1 1 X X 1 X 1 X 1X 1 1 X 1 X X 1 1 11 X 1 11 X B D C E F g = C’E’ + A’CE + D’EF

71 CMPUT 329 - Computer Organization and Architecture II71 Example: BCD to Braille Convertion

72 CMPUT 329 - Computer Organization and Architecture II72 Example: BCD to Braille Convertion A X X XX XX B CD W = ?

73 CMPUT 329 - Computer Organization and Architecture II73 Example: BCD to Braille Convertion A 1 11 1 1 X1 X X1 1 X XX B CD W = ?

74 CMPUT 329 - Computer Organization and Architecture II74 Example: BCD to Braille Convertion A 1 11 1 1 X1 X X1 1 X XX B CD W = B + C + A’D + AD’

75 CMPUT 329 - Computer Organization and Architecture II75 Example: BCD to Braille Convertion A X X XX XX B CD X = ? W = B + C + A’D + AD’

76 CMPUT 329 - Computer Organization and Architecture II76 Example: BCD to Braille Convertion A 11 1 X X1 X1 1 X XX B CD X = ? W = B + C + A’D + AD’

77 CMPUT 329 - Computer Organization and Architecture II77 Example: BCD to Braille Convertion A 11 1 X X1 X1 1 X XX B CD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

78 CMPUT 329 - Computer Organization and Architecture II78 Example: BCD to Braille Convertion A X X XX XX B CD Y = ? X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

79 CMPUT 329 - Computer Organization and Architecture II79 Example: BCD to Braille Convertion A 11 1 X1 X X1X XX B CD Y = ? X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

80 CMPUT 329 - Computer Organization and Architecture II80 Example: BCD to Braille Convertion A 11 1 X1 X X1X XX B CD Y = A’C’D’ + AD’ + BD X = C’D’ + CD + AD + BC W = B + C + A’D + AD’

81 CMPUT 329 - Computer Organization and Architecture II81 Example: BCD to Braille Convertion A 1 1 X1 X1 X1 1 X XX B CD Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

82 CMPUT 329 - Computer Organization and Architecture II82 Example: BCD to Braille Convertion Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’ How can we use these standard sum-of-product equations to implement a multiple-output NAND network? We use the DeMorgan Law: X= AB + CD = ((AB + CD)’)’ = ((AB)’(CD)’)’

83 CMPUT 329 - Computer Organization and Architecture II83 Example: BCD to Braille Convertion Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’ How do we implement this conversor in a PAL14H4?

84 PAL14H4 A B C D W X Y Z

85 A B C D W X Y Z W = B + C + A’D + AD’

86 PAL14H4 A B C D W X Y Z X = A’C’D’ + CD + AD + BC

87 PAL14H4 A B C D W X Y Z Y = A’C’D’ + AD’ + BD

88 PAL14H4 A B C D W X Y Z Z = AD + BC + B’D’


Download ppt "CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral."

Similar presentations


Ads by Google