1 / 28

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 11 Theorems Apply Boolean Algebra to: Simplifying Expressions Multiplying Out Expressions

flo
Télécharger la présentation

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 Sistem Komputer NAROTAMA

  2. Boolean AlgebraObjectives • Understand basic Boolean Algebra • Relate Boolean Algebra to Logic Networks • Prove Laws using Truth Tables • Understand and Use First 11 Theorems • Apply Boolean Algebra to: • Simplifying Expressions • Multiplying Out Expressions • Factoring Expressions Sistem Komputer NAROTAMA

  3. A New Kind of Algebra Sistem Komputer NAROTAMA

  4. Complement Operation Also known as invert or not. This is a truth-table. It gives input-output mappingby simply enumerating all possible input combinations and the associated output. Sistem Komputer NAROTAMA

  5. Logical AND Operation • denotes AND Output is true if all inputs are true Sistem Komputer NAROTAMA

  6. Logical OR Operation + denotes OR Output is true if any inputs are true Sistem Komputer NAROTAMA

  7. 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 Sistem Komputer NAROTAMA

  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 A literal iseach instance of a variable or constant This expression has 4 variables and 10 literals: a’bd + bcd + ac’ + a’d’ Sistem Komputer NAROTAMA

  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 Sistem Komputer NAROTAMA

  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 Sistem Komputer NAROTAMA

  11. Another Example F = ? F = A’B’C + A’BC’ + AB’C’ + ABC Sistem Komputer NAROTAMA

  12. Yet Another Example Q = A’B’ + A’B + AB’ + AB = 1 (Q is always true) May be multiple expressions for any given truth table. Sistem Komputer NAROTAMA

  13. Converting Boolean Functions to Truth Tables F = AB + BC BC AB BC Sistem Komputer NAROTAMA

  14. Some Basic Boolean Theorems From these… We can derive these… Sistem Komputer NAROTAMA

  15. = These two expressions are equal. Proof Using Truth Tables Truth Tables can be used to prove that 2 Boolean expressions are equal. If the 2 expressions have the same values for all possible combinations of variables, they are equal. X Y’ + Y = X + Y Sistem Komputer NAROTAMA

  16. Basic Boolean Algebra Theorems Here are the first 5 Boolean Algebra theorems we will study and use. Sistem Komputer NAROTAMA

  17. 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 Sistem Komputer NAROTAMA

  18. 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 Sistem Komputer NAROTAMA

  19. Distributive Law X ( Y + Z ) = X Y + X Z Prove with a truth table: = Just like regular algebra Sistem Komputer NAROTAMA

  20. Other Distributive Law Proof:X + Y Z = ( X + Y ) ( X + Z ) NOT like regular algebra! Sistem Komputer NAROTAMA

  21. Simplification Theorems X Y + X Y’ = X ( X + Y ) (X + Y’ ) = X X + X Y = X X ( X + Y ) = X ( X + Y’ ) Y = X Y X Y’ + 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 Sistem Komputer NAROTAMA

  22. Multiplying Out • All terms are products of single variables 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) Sistem Komputer NAROTAMA

  23. ( 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… Sistem Komputer NAROTAMA

  24. 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 We call this product-of-sums form or POS Sistem Komputer NAROTAMA

  25. 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 Sistem Komputer NAROTAMA

  26. 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 learn both Sistem Komputer NAROTAMA

  27. Duality • If an equality is true • Its dual will be true as well • To form dual: • AND  OR • Invert constant 0’s or 1’s • Do NOT invert variables Because these are true These are also true Sistem Komputer NAROTAMA

  28. More Duality Because these are true These are also true HINT: when forming duals, first apply parents to all AND terms.Result will be correct. Sistem Komputer NAROTAMA

More Related