1 / 35

Gates – Part 2

Gates – Part 2. Converting English to Boolean Expressions. The air conditioner should be turned on if and only if: - the temperature is greater than 75 , - the time is between 8a.m. and 5 p.m., - and it is not a holiday. 1. Identify phrases.

yuli-hays
Download Presentation

Gates – Part 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gates – Part 2 ECEn 224

  2. Converting English to Boolean Expressions ECEn 224

  3. The air conditioner should be turned on if and only if: - the temperature is greater than 75, - the time is between 8a.m. and 5 p.m., - and it is not a holiday. ECEn 224

  4. 1. Identify phrases The air conditioner should be turned on if and only if: - the temperature is greater than 75, - the time is between 8a.m. and 5 p.m., - and it is not a holiday. F =air conditioner should be turned on A = temperature is greater than 75 B = time is between 8a.m. and 5 p.m C = it is a holiday ECEn 224

  5. 2. Identify connective words = The air conditioner should be turned on if and only if: - the temperature is greater than 75, - the time is between 8a.m. and 5 p.m., - and it is not a holiday. AND ECEn 224

  6. 3. Construct a Boolean Expression The air conditioner should be turned on if and only if: - the temperature is greater than 75, - the time is between 8a.m. and 5 p.m., - and it is not a holiday. F =air conditioner should be turned on A = temperature is greater than 75 B = time is between 8a.m. and 5 p.m C = it is a holiday F = A • B • C’ ECEn 224

  7. 4. Draw the Network The air conditioner should be turned on if and only if: - the temperature is greater than 75, - the time is between 8a.m. and 5 p.m., - and it is not a holiday. F = A • B • C’ A F B C ECEn 224

  8. Converting English to Boolean 1. Identify phrases 2. Identify connective words 3. Construct a Boolean Expression 4. Draw the Network ECEn 224

  9. Converting English to Boolean • Be careful: Boolean algebra is precise, English is not. The roads will be very slippery if it snows or rains and there is oil on the road. A C B F = A + BC or F = (A + B) C Which is it? ECEn 224

  10. AND/OR vs. OR/AND Logic Forms ECEn 224

  11. A B C f AND/OR Logic from Truth Table 1. Write the SOP by inspection for f f = A’B’C +AB’C + ABC’ + ABC ECEn 224

  12. AND/OR Logic from Truth Table 2. Simplify the equation f = A’B’C +AB’C + ABC’ + ABC f = (A + A’) B’C + AB (C + C’) f = AB + B’C ECEn 224

  13. AND/OR Logic from Truth Table 3. Draw the logic network f = AB + B’C A f B C “AND/OR” ECEn 224

  14. A B C f OR/AND Logic from Truth Table • Write a POS by inspection from f f’= A’B’C’ + A’BC’ + AB’C’ f = (A’B’C’ + A’BC’ + AB’C’)’ f = (A + B + C)(A + B’ + C)(A’ + B + C) ECEn 224

  15. OR/AND Logic from Truth Table 3. Simplify the equation: f = (A + B + C)(A + B’ + C)(A’ + B + C) f = (A + B)(A + B’)(A’ + B) + C f = (A)(A’ + B) + C f = (AA’ + AB) + C f = AB + C f = (A + C)(B + C) A + BCD = A + B(CD) = (A + B)(A + CD) = (A + B)(A + C)(A + D) (X + Y)(X + Y’) = X ECEn 224

  16. OR/AND Logic from Truth Table 4. Draw the logic network f = (A+C)(B+C) A C f B C “OR/AND” ECEn 224

  17. Types of Gates • Gates already studied • AND, NAND • OR, NOR • Inverter (NOT) • XOR (Exclusive-OR) • XNOR (Equivalence) ECEn 224

  18. NAND/NAND and NOR/NOR Logic ECEn 224

  19. AND/OR to NAND/NAND Algebra-based: AB+CD = [AB+CD]’’ = [(AB)’(CD)’]’ Preferred symbol in this context… Schematic-based: ECEn 224

  20. OR/AND to NOR/NOR Algebra-based: (A+B)(C+D) = [(A+B)(C+D)]’’ = [(A+B)’ + (C+D)’]’ Preferred symbol in this context… Schematic-based: ECEn 224

  21. Alternative Gate Symbols Which is easier to understand? A A B B Q = ? Q = ? C C D D A A B B Q = AB + CD Q = (A+B)(C+D) C C D D If you think of the bubbles as canceling each other out… ECEn 224

  22. Bubble Matching How to make schematics readable, understandable, maintainable, … ECEn 224

  23. Bubble Matching Rules • Choose alternative symbols • Match all interior bubbles • More than one solution • Makes reading of the function trivial A A F F B B C C D D F = [(AB)’(C+D)’]’ ??? F = AB + (C+D) = AB+C+D ECEn 224

  24. More Bubble Matching A A F F B B C C D D This doesn’t work – has unmatched bubbles A F B C D This works. F = AB + C’D’ ECEn 224

  25. Yet More Bubble Matching A A F F B B C C D D Same circuit as on previous slide… Alternative solution = convert top-left gate. F’ = (A’+B’)(C+D)F = AB+C’D’ Same result as on previous slide ECEn 224

  26. Can Bubbles Always Be Matched? This is called reconvergent fanout • No… x A y B F E C D Nodes x and y both drive final gate and so both need same polarity (bubble or no bubble). Can’t satisfy that requirement because x also drives y’s input. ECEn 224

  27. Bubble Matching Summary • Convert symbols to match bubbles • Two versions for each circuit • Inverted output • Non-inverted output • Good schematic style similar to good programming style • Convey meaning as well as function • Document the design ECEn 224

  28. Functional Completeness ECEn 224

  29. Functionally Complete • AND, OR, and NOT make a functionally complete set of operators • There is no truth table which cannot be implemented using AND, OR, NOT • Any set of gates which can implement AND, OR and NOT is also functionally complete ECEn 224

  30. Functionally Complete • Is the set {AND, NOT} functionally complete? • If I could just build an OR gate… Success! or… X + Y = (X’Y’)’ ECEn 224

  31. Functionally Complete • Is the set {OR, NOT} functionally complete? • If I could just build an AND gate… Success! or… XY = (X’ + Y’)’ ECEn 224

  32. Functionally Complete • Is the set {AND, OR} functionally complete? • No! Can’t do a NOT ECEn 224

  33. How About NAND Only? NOT AND OR Success! ECEn 224

  34. How About NOR Only? NOT OR AND Success! ECEn 224

  35. Functional Completeness • A few functionally complete sets: ECEn 224

More Related