Boolean Logic
Boolean Operators (T/F) x y x AND y F T x NOT x F T x y x OR y F T x y x XOR y F T
Boolean Operators (1/0) x y x AND y 1 x NOT x 1 x y x OR y 1 x y 1 x NOT x 1 x y x OR y 1 x y x XOR y 1
Boolean Operators Symbols NOT ā (overbar), a’, ~a AND · (mult. dot) OR + XOR (plus sign with circle around it)
Boolean Expressions Follows a logical order of operations Example: NOT operators Parentheses AND OR Example: x + y·z
Truth Tables Write out table of all possible combinations of truth values Evaluate the boolean expression for all combinations Example x + y·z x y z x + y·z F T
Example What is the truth table for: ~x + y? x y ~x + y F T
Another Example What is the truth table for: x·(~y)? x y x·(~y) F T
Your Turn What is the truth table for the boolean expression: x + ~y + z?
Simplifying Boolean Expressions Commutative laws A + B = B + A A · B = B · A Associative laws A + (B + C) = (A + B) + C A · (B · C) = (A · B) · C Distributive laws A · (B + C) = A · B + A · C A + (B · C) = (A + B) · (A + C)
Simplifying Boolean Expressions Tautology laws A · A = A A + A = A A + ~A = 1 A · ~A = 0 Absorption Law A + (A · B) = A A · (A + B) = A
Simplifying Boolean Expressions Identities 0 · A = 0 0 + A = A A + 1 = 1 1 · A = A A = A Complement A + ~A · B = A + B
Examples A + A + A + A = A Using the Tautology law
A Bigger Example Simplify ~A · B + A · ~B + ~A · ~B ~A · B + (A · ~B + ~A · ~B) Associative ~A · B + (~B · (A + ~A)) Distributive ~A · B + ~B & Tautology ~A + ~B Complement Verify with a truth table!
Practice Show that A + B · C = (A + B) · (A + C) is true using a truth table.
Practice Show that A + ~A · B = A + B
Practice Simplification Simplify A + AB + ~B and verify with a truth table
De Morgan’s Laws ~(A · B) = ~A + ~B ~A · ~B = ~(A+B) Take a term NOT the individual members of the term A · B Change the operator i.e. · to +, or + to · A + B NOT the entire term ~(A+B)
De Morgan’s Law Example f = ~A · ~B + (~A + ~B) = ~~( ~A · ~B + (~A + ~B) ) NOT NOT = ~( (A + B) · ~(~A + ~B) ) De Morgan’s = ~( (A + B) · (A·B) ) De Morgan’s = ~( A·(A·B) + B·(A·B) ) Distributive = ~( A·B + A·B ) Tautology = ~(A·B) Tautology