Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Logic.

Similar presentations


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

1 Boolean Logic

2 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

3 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

4 Boolean Operators Symbols
NOT ā (overbar), a’, ~a AND · (mult. dot) OR + XOR  (plus sign with circle around it)

5 Boolean Expressions Follows a logical order of operations Example:
NOT operators Parentheses AND OR Example: x + y·z

6 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

7 Example What is the truth table for: ~x + y? x y ~x + y F T

8 Another Example What is the truth table for: x·(~y)? x y x·(~y) F T

9 Your Turn What is the truth table for the boolean expression: x + ~y + z?

10 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)

11 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

12 Simplifying Boolean Expressions
Identities 0 · A = 0 0 + A = A A + 1 = 1 1 · A = A A = A Complement A + ~A · B = A + B

13 Examples A + A + A + A = A Using the Tautology law

14 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!

15 Practice Show that A + B · C = (A + B) · (A + C) is true using a truth table.

16 Practice Show that A + ~A · B = A + B

17 Practice Simplification
Simplify A + AB + ~B and verify with a truth table

18 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)

19 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


Download ppt "Boolean Logic."

Similar presentations


Ads by Google