Boolean Algebra
Objectives: Learn about the orgin of Boolean Algebra. Learn about the identity laws associated with Boolean Algebra. Learn how to simplify Boolean expressions.
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).
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.
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
Boolean Algebra Truth Tables AND true AND true = true true AND false = false false AND true = false false AND false = false
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
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
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
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
Identity Laws
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.
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.
Commutative Law A + B = B + A A * B = B * A
Associative Law A + (B + C) = (A + B) + C A * (B * C) = (A * B) * C
Distributive Law for and over or A * (B + C) = (A * B) + (A * C)
A + 1 = 1 Law of Union true or true = true false or true = true Adding 1 always results in 1.
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.
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.
A * 0 = 0 Law of Intersection true or false = false false or false = false Multiplying by 0 always results in 0.
A * (A + B) = A A + (A * B) = A Law of Absorption A(A + B) A + AB
Double Negative Law
Law of Complement
DeMorgan’s Law
Examples?
1. (A * B)A (0 * B)
(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
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
4. (AB + AB) Indempotent Law AB
5. (A + BC)(AB) (A + BC)(AB) AB + ABC AB(1 + C) AB
Questions?
Object Oriented Programming Java Object Oriented Programming Begin Boolean Algebra The material in this chapter is not tested on the AP CS exams.