Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Algebra.

Similar presentations


Presentation on theme: "Boolean Algebra."— Presentation transcript:

1 Boolean Algebra

2 Objectives: Learn about the orgin of Boolean Algebra.
Learn about the identity laws associated with Boolean Algebra. Learn how to simplify Boolean expressions.

3 Boolean Algebra Boolean algebra was introduced by George Boole in his first book The Mathematical Analysis of Logic (1847), and set forth more fully in his An Investigation of the Laws of Thought (1854).

4 Boolean Algebra Boolean algebra is the branch of algebra in which the values of the variables are the truth values true and false, usually denoted 1 and 0 respectively. The operations used in Boolean algebra are the logical and, denoted *, or, denoted +, and the negation not, denoted . Boolean algebra is used to describe logical relationships in the same way that ordinary algebra describes numeric relationships.

5 Boolean Algebra Boolean algebra has been fundamental in the development of digital electronics, and is provided for in all modern programming languages. if (a > 0 && a <= 10) // then a is between // 1 and 11 Logical AND operator

6 Boolean Algebra Truth Tables
AND true AND true = true true AND false = false false AND true = false false AND false = false

7 Boolean Algebra Truth Tables
AND true AND true = true true AND false = false false AND true = false false AND false = false if an item cost a quarter you can buy it if you have 2 dimes and 1 nickel

8 Boolean Algebra Truth Tables
AND true AND true = true true AND false = false false AND true = false false AND false = false OR true OR true = true true OR false = true false OR true = true false OR false = false

9 Boolean Algebra Truth Tables
AND true AND true = true true AND false = false false AND true = false false AND false = false OR true OR true = true true OR false = true false OR true = true false OR false = false if an item costs a dime you can buy it if you have 10 pennies or 2 nickels

10 Boolean Algebra Truth Tables
AND true AND true = true true AND false = false false AND true = false false AND false = false OR true OR true = true true OR false = true false OR true = true false OR false = false NOT NOT true = false NOT false = true

11 Identity Laws

12 Indempotent Law A + A = A OR true or true = true
false or false = false The result is unchanged when A is added to itself. Unchanged when added to itself.

13 Indempotent Law A * A = A AND true and true = true
false and false = false The result is unchanged when A is multiplied by itself. unchanged when multiplied by itself.

14 Commutative Law A + B = B + A A * B = B * A

15 Associative Law A + (B + C) = (A + B) + C A * (B * C) = (A * B) * C

16 Distributive Law for and over or
A * (B + C) = (A * B) + (A * C)

17 A + 1 = 1 Law of Union true or true = true false or true = true
Adding 1 always results in 1.

18 1 is the identity element for and
A * 1 = A true and true = true false and true = false Multiplying by 1 has no effect on the result.

19 0 is the identity element for or
A + 0 = A true or false = true false or false = false Adding 0 has no effect the result.

20 A * 0 = 0 Law of Intersection true or false = false
false or false = false Multiplying by 0 always results in 0.

21 A * (A + B) = A A + (A * B) = A Law of Absorption A(A + B) A + AB

22 Double Negative Law

23 Law of Complement

24 DeMorgan’s Law

25 Examples?

26 1. (A * B)A (0 * B)

27 (A + B)(A + B) (A + B)(A + B) 0 + AB + AB + B AB + AB + B (A + A + 1)B
2. (A + B)(A + B) (A + B)(A + B) 0 + AB + AB + B AB + AB + B (A + A + 1)B B

28 A(A + B) A + AB A(1 + B) A(1) A (A + A)(A + B) (A + A)(A + B) A(A + B)
3. A(A + B) A + AB A(1 + B) A(1) A (A + A)(A + B) (A + A)(A + B) A(A + B) Law of Absorption A

29 4. (AB + AB) Indempotent Law AB

30 5. (A + BC)(AB) (A + BC)(AB) AB + ABC AB(1 + C) AB

31 Questions?

32 Object Oriented Programming
Java Object Oriented Programming Begin Boolean Algebra The material in this chapter is not tested on the AP CS exams.


Download ppt "Boolean Algebra."

Similar presentations


Ads by Google