1 / 58

ECE 171 Digital Circuits Chapter 4 Boolean Algebra

ECE 171 Digital Circuits Chapter 4 Boolean Algebra. Herbert G. Mayer, PSU Status 4/22/2018 Copied with Permission from prof. Mark Faust @ PSU ECE. Syllabus. Boolean Algebra Huntington ’ s Postulates Operators Truth Tables Boolean Functions and Theorems Graphic Symbols References.

Download Presentation

ECE 171 Digital Circuits Chapter 4 Boolean Algebra

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. ECE 171Digital Circuits Chapter 4 Boolean Algebra Herbert G. Mayer, PSU Status 4/22/2018 Copied with Permission from prof. Mark Faust @ PSU ECE

  2. Syllabus Boolean Algebra Huntington’s Postulates Operators Truth Tables Boolean Functions and Theorems Graphic Symbols References

  3. Boolean Algebra • A fire sprinkler system F should spray water if high heat is sensed and the system is in the state: enabled Let Boolean variable h represent “high heat is sensed,” let e represent “enabled,” and F represent “spraying water.” Then an equation is: F = h AND e • A car alarm F should sound if the alarm is enabled, and either the car is shaken or the door is opened Let a represent “alarm is enabled,”s represent “car is shaken,”d represent “door is opened,” and F represent “alarm sounds.” Then an equation is: F = a AND ( s OR d )

  4. Boolean Algebra (History) • 384-322 BC: Aristotle, foundations of logic • 1854: George Boole, “An Investigation of the Laws of Thought”, mathematical methods for two-valued logic • 1904: H.E. Huntington, “Sets of Independent Postulates for the Algebra of Logic” • 1938: Claude Shannon, “A Symbolic Analysis of Relay Switching Circuits”

  5. Boolean Algebra • Postulates (Axioms) Accepted as true; Foundation for further proofs • Values B = { 0, 1 } • Variables A, B, C X, Y, Z Ready, Green, OverWeightLimit • Operators (often represented differently!) + × • Additional Operators () =

  6. Huntington’s Postulates

  7. Boolean Algebra • Literals Variable or Complement of Variable X, DoorOpen, Green • Expressions Constants ( 0, 1 ), Literals, Operators ( X + Y×Z ), A + B • Precedence Complement AND × OR + () Use to override default order, or enhance “readability”

  8. Operators • Complement, AKA NOT A’ /A !A ØA ~A A A • OR A + B A | B A Ú B v for Latin: vel = or • AND A * B A & B A × B A Ù B A B

  9. Truth Tables (NOT)

  10. Graphic Symbols

  11. Additional Operators • NOR A + B A | B A Ú B • NAND A * B A & B A × B A Ù B A B

  12. Truth Tables X Y X + Y 0 0 1 0 1 0 1 0 0 1 1 0 X Y X × Y 0 0 1 0 1 1 1 0 1 1 1 0 NOR operator NAND operator

  13. Graphic Symbols

  14. Additional Operators • XOR (Exclusive OR, Modulo 2, Different) A Å B • XNOR (Exclusive NOR, Equal ) A Å B AKA “Equivalence” in Europe

  15. Truth Tables X Y X Å Y 0 0 0 0 1 1 1 0 1 1 1 0 X Y X Å Y 0 0 1 0 1 0 1 0 0 1 1 1 XOR operator XNOR operator

  16. Graphic Symbols

  17. Boolean Functions • Product Terms • Comprised of literals (including complements), AND • X×Y×Z A×B×C X Y Z A B C • Sum Terms • Comprised of literals (including complements), OR • X + Y + Z A + B + C • Sum of Products (SOP) • X×Y + X×Z --parentheses not needed, AND binds higher • Product of Sums (POS) • (X + Y) × (X + Z) --parentheses needed! • F(X,Y,Z) --Boolean function of 3 variables X, Y, Z

  18. 0 1 2 3 . . . 63 B5 B4 B3 B2 B1 B0 F 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 . . . 1 1 1 1 1 1 1 26 = 64 Truth Tables Question: How many rows are there in a truth table for n variables? 2n As many rows as unique Combinations of inputs Enumerate by counting in binary

  19. Boolean Algebra -- Manipulation • Simplify • Operand Count Reduction • Reduce Number of Terms • Transform: Put in Preferred Form • AND/OR • NAND/NOR

  20. Term Reduction Huntington’s Postulate P4a F = (X + Y) × (X + Z) = X + Y×Z

  21. Huntington’s Postulate via Karnaugh

  22. Boolean Theorems

  23. Boolean Theorems

  24. Boolean Theorems

  25. Boolean Functions • Boolean function f() expresses a truth value, depending on Boolean operands and operators • Often denoted as true or false • True or false can be represented as 0 and 1, sometimes on or off, or high_voltage or low_voltage, or other variations • Key idea: there are 2 possible values per Boolean value, no more! • We’ll pick 0 and 1 • Operand values can be combined via operators • Operands are variables or constants

  26. Boolean Functions • Operators include or, and, not, xor, equivalence, their negations, many more • Operators handle 1 or 2 values, often variables, to create a new Boolean result • E.g. function f0( a, b ) here depends on 2 Boolean variables a and b, yielding true if a and b differ: f0( a, b ) = a xor b • Name of operation: exclusive or, AKA xor

  27. Boolean Function We can write Boolean functions as: • Expressions • Tables • Maps, specifically 2D Karnaugh Maps • Maps, drawn as a 3D thorus • Minterms, Minterm sum Σ • Maxterms, Maxterm product Π • Etc.

  28. Boolean Function Via Expression • Given Boolean variables a, b, c, d, and the specific Boolean function f1( a, b, c, d ) below • f1() may be encoded as an expression, as shown, with ‘ standing for negating its preceding operand; e.g. x’ means “not x”: f1 = b’ and d’-- a, c are don’t cares for f1()

  29. Boolean Function Via Truth Table Function f1() can be expressed as Truth Table:

  30. Boolean Function Via Truth Table f1() can be expressed as Karnaugh Map, AKA K-Map:

  31. Boolean Function Via Truth Table Function f1() can be expressed as a thorus, found in [1] at Wiki:

  32. Boolean Function Via Truth Table Function f1() can be expressed as Minterms: f1( a, b, c, d ) = Σ mi with i = { 0, 2, 8, 10 }

  33. Boolean Function Via Truth Table Function f1() can be expressed as Maxterms: f1’( a, b, c, d ) = Π mi with i = { 1, 3, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15 }

  34. K-Maps • Karnaugh Maps, AKA K-Maps offer an intuitive way to minimize a function . . . • By grouping together as many terms (1s or 0s) together in rectangular groups • Even wrap-around sides of a rectangle to capture Boolean variables • Hard to draw K-Maps, with more than 4 variables; see sample with 5 • Can use multiple K-Maps for 6 or more variables

  35. K-Maps: f2() • Key idea: group largest possible rectangle of all ‘1’ together, until all ‘1’ are covered • Sometimes rectangle may be distributed: spread over various physical partitions

  36. K-Maps: f2() Solution for f2()

  37. K-Maps: f3() Largest groups of groups of all ones (‘1’) viewed together, including across border

  38. K-Maps: f3() Solution for f3()

  39. K-Maps: f4() Largest groups of rectangles of all ones (‘1’) together, including “double-counting”

  40. K-Maps: f4() Solution for f4()

  41. K-Maps: f5() • If f2() had a few Don’t Cares, indicated by x, how could we express function f5()? • Set some x = 1, some others to x = 0

  42. K-Maps: f5() A possible solution for f5()

  43. Simpler K-Maps: f6_1() Only 3 Boolean variables; determine f6_1(): f6_1 = a b + ac + b’ c Perhaps we can do better?

  44. Simpler K-Maps: f6_2() Same 3 Boolean variables for f6_2() f6_2 = a b + b’ c Consensus Theorem in action!

  45. More Complex K-Map: f7() • f7() is function of 5 variables: a b c d e • Here K-map for f7() = abc + bcd + cde

  46. Truth Table for f7()

  47. Student Exercise K-Map: f7_1() • f7_1() also function of 5 variables: a b c d e • Compute K-map for f7_1() = ?

  48. Student Exercise K-Map: f7_1() Solution: f7_1() = abe + cde + bcd

  49. Student Exercise K-Map: f7_2() • f7_2() function of 5 variables: a b c d e • Compute harder K-map for f7_2() = ?

  50. Student Exercise K-Map: f7_2() Solution: f7_2() = cde + bcd+ abde + abce’

More Related