boolean logic. boolean operators (t/f) xyx and y fff ftf tff ttt xyx or y fff ftt tft ttt xnot x ft...
TRANSCRIPT
![Page 1: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/1.jpg)
Boolean Logic
![Page 2: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/2.jpg)
Boolean Operators (T/F)x y x AND y
F F F
F T F
T F F
T T T
x y x OR y
F F F
F T T
T F T
T T T
x NOT x
F T
T F
![Page 3: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/3.jpg)
Boolean Operators (1/0)x y x AND y
0 0 0
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
x NOT x
0 1
1 0
![Page 4: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/4.jpg)
More Boolean Operators (1/0)x y x NAND y
0 0 1
0 1 1
1 0 1
1 1 0
x y x NOR y
0 0 1
0 1 0
1 0 0
1 1 0
x y x XOR y
0 0 0
0 1 1
1 0 1
1 1 0
NAND = NOT(x AND y)NOR = NOT(x OR y)XOR = EXCLUSIVE OR
![Page 5: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/5.jpg)
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
![Page 6: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/6.jpg)
Truth Tables Write out table of all
possible combinations of truth values
Evaluate the boolean expression for all combinations
Examplex OR y AND z
x y z x OR (y AND z)
F F F F
F F T F
F T F F
F T T T
T F F T
T F T T
T T F T
T T T T
![Page 7: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/7.jpg)
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
![Page 8: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/8.jpg)
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
![Page 9: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/9.jpg)
Your Turn What is the truth table for the Boolean
expression: x OR NOT y OR z?
![Page 10: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/10.jpg)
Your Turn What is the truth table for the Boolean
expression: x NAND y OR NOT z
![Page 11: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/11.jpg)
Your turn What is the truth table for the Boolean
expression: a AND (b XOR c)
![Page 12: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/12.jpg)
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
![Page 13: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/13.jpg)
Problem Scenarios
1. You will be given a scenario
2. Identify the input variables
3. Write the Boolean expression
4. Construct the truth table
![Page 14: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/14.jpg)
Scenario #1 Either the sun is shining or rain is falling
1. Identify the input variables
2. Write the Boolean expression
3. Construct the truth table
![Page 15: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/15.jpg)
Scenario #2 Maria won’t go to school if it is cold and
raining or she has not done her homework.
1. Identify the input variables
2. Write the Boolean expression
3. Construct the truth table
![Page 16: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/16.jpg)
Scenario #3 Your car has 4 wheel drive, which turns on
when the temperature is freezing or when you hit the manual override, but you cannot turn on the override when you are going over 60 mph.
1. Identify the input variables
2. Write the Boolean expression
3. Construct the truth table
![Page 17: Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF](https://reader035.vdocuments.net/reader035/viewer/2022081511/56649f275503460f94c3ed66/html5/thumbnails/17.jpg)
Scenario #4 You are ordering dinner, and your options
are a burger, fries, and vegetables. You cannot get a burger and a side of fries together. The healthy option of steamed vegetables is allowed with your burger.