Understanding Boolean Algebra and Logical Statements

Slide Note
Embed
Share

Introduction to Boolean algebra, logical statements, and compound statements. Explore the concepts of Boolean variables, logical operators, writing conventions, equivalence in Boolean algebra, and truth tables. Learn how to analyze and evaluate logical expressions using truth tables.


Uploaded on Jul 16, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Boolean Algebra

  2. Logical Statements A proposition that may or may not be true: Today is Monday. Today is Sunday. It is raining.

  3. Compound Statements More complicated expressions can be built from simpler ones: Today is Monday AND it is raining. Today is Sunday OR it is NOT raining Today is Monday OR today is NOT Monday (This is a tautology) Today is Monday AND today is NOT Monday (This is a contradiction) The expression as a whole is either true or false.

  4. Boolean Algebra Boolean Algebra allows us to formalize this sort of reasoning. Boolean variables may take one of only two possible values: TRUE or FALSE. (or, equivalently, 1 or 0) Arithmetic operators: + - * / Logical operators - AND, OR, NOT, XOR

  5. Logical Operators A AND B - True only when both A and B are true. A OR B - True unless both A and B are false. NOT A - True when A is false. False when A is true. A XOR B - True when either A or B are true, but not when both are true. A B A AND B F F F T A B F F T T A OR B F T T T A F T NOT A T F F T F T F F T T F T F T

  6. Writing AND, OR, NOT A AND B = A ^ B = AB A OR B = A v B = A+B NOT A = = A TRUE = T = 1 FALSE = F = 0 A

  7. Boolean Algebra The = in Boolean Algebra indicates equivalence Two statements are equivalent if they have exactly the same conditions for being true. (More in a second) For example, True = True A = A (AB)' = (A' + B')

  8. Truth Tables Provide an exhaustive approach to describing when some statement is true (or false)

  9. Truth Table M R MR M + R M R F F F T T F T T

  10. Truth Table M R MR M + R M R F F T T F T T F T F F T T T F F

  11. Truth Table M R MR M + R M R F F T T F F T T F F T F F T F T T F F T

  12. Truth Table M R MR M + R M R F F T T F F F T T F F T T F F T F T T T F F T T

  13. Exercise Write the truth table for (A + B) B

  14. Exercise: (A + B) B (A + B) B A B A + B

  15. Solution to (A + B) B (A + B) B A B A + B F F F F F T T T F T T T T T F T Note: Truth Tables can be used to prove equivalencies. What have we proved in this table?

  16. Solution to (A + B) B (A + B) B A B A + B F F F F F T T T F T T T T T F T Note: Truth Tables can be used to prove equivalencies. What have we proved in this table? (A + B) B = B

  17. Boolean Algebra - Identities A AND ? = A A AND True =?= A A AND False =?= A

  18. Boolean Algebra - Identities A Tru e T T A AND True A AND ? = A A AND True = A F T F T So,what about A AND False ?

  19. Boolean Algebra - Identities A Tru e T T A AND True A AND ? = A A AND True = A F T F T So,what about A AND False ? A AND False = False A F T False F F A AND False F F

  20. Boolean Algebra - Identities A OR ? = A A OR True =?= A A OR False =?= A

  21. Boolean Algebra - Identities A F T False F F A OR False F T A OR ? = A A OR False = A So,what about A OR True?

  22. Boolean Algebra - Identities A F T False F F A OR False F T A OR ? = A A OR A OR False False = A = A So,what about A OR True? A OR True = True A F T True T T A OR True T T

  23. Boolean Algebra - Identities A + True = True A + False = A A + A = A A True = A A False = False A A = A (A ) = A A + A = True A A = False

  24. Commutative, Associative, and Distributive Laws AB = BA A + B = B + A A(BC) = (AB)C A + (B + C) = (A + B) + C A (B + C) = (AB) + (AC) A + (BC) = (A + B) (A + C) (Commutative) (Associative) (Distributive)

  25. DeMorgans Laws (A + B) = A B (AB) = A + B

Related