Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF.

Similar presentations


Presentation on theme: "Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF."— Presentation transcript:

1 Boolean Logic

2 Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF

3 Boolean Operators (1/0) xyx AND y 000 010 100 111 xyx OR y 000 011 101 111 xNOT x 01 10

4 More Boolean Operators (1/0) xyx NAND y 001 011 101 110 xyx NOR y 001 010 100 110 xyx XOR y 000 011 101 110 NAND = NOT(x AND y) NOR = NOT(x OR y) XOR = EXCLUSIVE OR

5 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

6 Truth Tables Write out table of all possible combinations of truth values Evaluate the boolean expression for all combinations Example x OR y AND z xyzx OR (y AND z) FFFF FFTF FTFF FTTT TFFT TFTT TTFT TTTT

7 Example What is the truth table for: NOT x OR y? xyNOT x OR y FF FT TF TT

8 Another Example What is the truth table for: x AND NOT y? xyx AND NOT y FF FT TF TT

9 Your Turn What is the truth table for the Boolean expression: x OR NOT y OR z?

10 Your Turn What is the truth table for the Boolean expression: x NAND y OR NOT z

11 Your turn What is the truth table for the Boolean expression: a AND (b XOR c)

12 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

13 Problem Scenarios 1. You will be given a scenario 2. Identify the input variables 3. Write the Boolean expression 4. Construct the truth table

14 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

15 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

16 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

17 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.


Download ppt "Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF."

Similar presentations


Ads by Google