1 / 29

Boolean Algebra – Part 1

Boolean Algebra – Part 1. Boolean Algebra Objectives. Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems Apply Boolean Algebra to: Simplifying Expressions Multiplying Out Expressions

burt
Download Presentation

Boolean Algebra – Part 1

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. Boolean Algebra – Part 1 ECEn 224

  2. Boolean AlgebraObjectives • Understand Basic Boolean Algebra • Relate Boolean Algebra to Logic Networks • Prove Laws using Truth Tables • Understand and Use First Basic Theorems • Apply Boolean Algebra to: • Simplifying Expressions • Multiplying Out Expressions • Factoring Expressions ECEn 224

  3. A New Kind of Algebra ECEn 224

  4. Truth Tables • A truth table provides a completeenumeration of the inputs and the corresponding output for a function. If there are n inputs, There will be 2n rows In the table. Unlike with regular algebra, full enumeration is possible (and useful) in Boolean Algebra ECEn 224

  5. Complement Operation Also known as invert or not. The inverse of x is written as x’ or x. ECEn 224

  6. Logical AND Operation “•” denotes AND Output is true iff all inputs are true ECEn 224

  7. Logical OR Operation “+” denotes OR Output is true if any inputs are true ECEn 224

  8. Boolean Expressions Boolean expressions are made up of variables and constants combined by AND, OR and NOT Examples: 1 A’ A•B C+D AB A(B+C) AB’+C •A•B is the same as AB (•is omitted when obvious). • Parentheses are used like in regular algebra for grouping. •NOT has highest precedence, followed byAND then OR. A term is a grouping of variables ANDed together. A literal iseach instance of a variable or constant. This expression has 4 variables, 3 terms, and 6 literals: a’b + bcd + a ECEn 224

  9. Boolean Expressions Each Boolean expression can be specified by a truth table which lists all possible combinations of the values of all variables in the expression. F = A’ + B C ECEn 224

  10. Boolean Expressions From Truth Tables Each 1 in the output of a truth table specifies one term in the corresponding boolean expression. The expression can be read off by inspection… F is true when: A is false AND B is true AND C is false OR A is true AND B is true AND C is true F = A’BC’ + ABC ECEn 224

  11. Another Example F = ? F = A’B’C + A’BC’ + AB’C’ + ABC ECEn 224

  12. Yet Another Example F = ? F = A’B’ + A’B + AB’ + AB = 1 (F is always true) There may be multiple expressions for any given truth table. ECEn 224

  13. BC AB BC Converting Boolean Functions to Truth Tables F = AB + BC ECEn 224

  14. Converting Boolean Functions to Truth Tables F = AB + BC BC AB BC ECEn 224

  15. Some Basic Boolean Theorems From these… We can derive these… ECEn 224

  16. = These two expressions are equal. Proof Using Truth Tables Truth Tables can be used to prove that 2 Boolean expressions are equal. If the two expressions have the same value for all possible combinations of input variables, they are equal. X Y’ + Y = X + Y ECEn 224

  17. Basic Boolean Algebra Theorems Here are the first 5 Boolean Algebra theorems we will study and use. ECEn 224

  18. Basic Boolean Algebra Theorems While these laws don’t seem very exciting, they can be very useful in simplifying Boolean expressions: Simplify: (M N’ + M’ N) P + P’ + 1 X + 1 1 ECEn 224

  19. Commutative Laws X • Y = Y • XX + Y = Y + X Associative Laws (X • Y) • Z = X • (Y • Z) = X • Y • Z (X + Y) + Z = X + (Y + Z ) = X + Y + Z Just like regular algebra ECEn 224

  20. Distributive Law X ( Y + Z ) = X Y + X Z Prove with a truth table: = Just like regular algebra ECEn 224

  21. Other Distributive Law X + Y Z = ( X + Y ) ( X + Z ) ( X + Y ) ( X + Z ) = X ( X + Z) + Y ( X + Z ) = X X + X Z + Y X + Y Z = X + X Z + X Y + Y Z = X • 1 + X Z + X Y + Y Z = X ( 1 + Z + Y ) + Y Z = X • 1 + Y Z = X + Y Z Proof: NOT like regular algebra! ECEn 224

  22. Simplification Theorems X Y + X Y’ = X ( X + Y ) (X + Y’) = X X + X Y = X X ( X + Y ) = X X + Y X’ = X + Y X ( X’ + Y ) = X Y These are useful for simplifying Boolean Expressions. The trick is to find X and Y. ( A’ + B + CD) (B’ + A’ + CD) ( A’ + CD + B) (A’ + CD + B’) Rearrange terms A’ + CD (X + Y)(X + Y’) = X ECEn 224

  23. Multiplying Out • All terms are products only • (no parentheses) A B C’ + D E + F G HYes A B + C D + EYes A B + C ( D + E )No Multiplied out = sum-of-products form (SOP) ECEn 224

  24. ( A’ + B )( A’ + C )( C + D ) Use ( X + Y )( X + Z ) = X + Y Z ( A’ + B C )( C + D ) Multiply Out A’ C + A’ D + B C C + B C D Use X • X = X A’ C + A’ D + B C + B C D Use X + X Y = X A’ C + A’ D + BC Multiplying Out - Example Using the theorems may be simpler than brute force. But, brute force does work… ECEn 224

  25. Factoring • Final form is products only • All sum terms are single variables only ( A + B + C’ ) ( D + E ) Yes ( A + B )( C + D’ )E’FYes ( A + B + C’ ) ( D + E ) + HNo ( A’ + BC ) ( D + E ) No Factored out = product-of-sums form (POS) ECEn 224

  26. A B + C D Use X + Y Z = ( X + Y )( X + Z ) ( A B + C )( A B + D ) Use X + Y Z = ( X + Y )( X + Z ) again ( A + C )( B + C )( A B + D ) And again ( A + C )( B + C )( A + D )( B + D ) Factoring - Example Sum of Products (SOP) Product of Sums (POS) ECEn 224

  27. POS vs. SOP • Any expression can be written either way • Can convert from one to another using theorems • Sometimes SOP looks simpler • AB + CD = ( A + C )( B + C )( A + D )( B + D ) • Sometimes POS looks simpler • (A + B)(C + D) = BD + AD + BC + AC • SOP will be most commonly used in this class but we must learn both ECEn 224

  28. Duality • If an equality is true its dual will be true as well • To form the dual: • AND  OR • Invert constant 0’s or 1’s • Do NOT invert variables Because these are true These are also true ECEn 224

  29. Theorem Summary For each theorem on the left, the dual is listed on the right. X + 0 = X X • 1 = X X + 1 = 1 X • 0 = 0 X + X = X X • X = X X + X’ = 1 X • X’ = 0 (X’)’ = X XY + XY’ = X (X + Y) (X + Y’) = X X + XY = X X(X + Y) = X X + YX’ = X + Y X(Y + X’) = X Y XY + X’Z + YZ = XY + X’Z (X + Y)(X’ + Z)(Y + Z) = (X + Y)(X’ + Z) HINT: when forming duals, first apply parentheses around all AND terms. ECEn 224

More Related