Professional Documents
Culture Documents
x y x OR y
F F F
F T T
T F T
T T T
Boolean Operators (1/0)
x y x AND y
x NOT x
0 0 0
0 1
0 1 0
1 0
1 0 0
1 1 1
x y x OR y
0 0 0
0 1 1
1 0 1
1 1 1
More Boolean Operators (1/0)
x y x NAND y
NAND = NOT(x AND y)
NOR = NOT(x OR y) 0 0 1
XOR = EXCLUSIVE OR 0 1 1
1 0 1
1 1 0
x y x NOR y x y x XOR y
0 0 1 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 0 1 1 0
Boolean Expressions
Follows a logical order of operations
1. NOT operators
2. Parentheses
3. AND
4. OR
Examples:
x OR y AND z
x OR (y AND z) Do it this way just in case
Truth Tables
Write out table of all
x y z x OR (y AND z)
possible combinations
F F F F
of truth values
F F T F
Evaluate the boolean F T F F
expression for all F T T T
combinations T F F T
T F T T
Example
T T F T
x OR y AND z
T T T T
Example
What is the truth table for: NOT x OR y?
x y NOT x OR y
F F
F T
T F
T T
Another Example
What is the truth table for: x AND NOT y?
x y x AND NOT y
F F
F T
T F
T T
Your Turn
What is the truth table for the Boolean
expression: x OR NOT y OR z?
Your Turn
What is the truth table for the Boolean
expression: x NAND y OR NOT z
Your turn
What is the truth table for the Boolean
expression: a AND (b XOR c)
Partner Practice
1. Write a Boolean expression with no more
than 3 variables (you can have multiple
Boolean operators)
2. Swap boards with somebody else in the
room
3. Write the truth table for the expression
Problem Scenarios
1. You will be given a scenario
2. Identify the input variables
3. Write the Boolean expression
4. Construct the truth table
Scenario #1
Either the sun is shining or rain is falling