Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Values The true story ;=P Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE.

Similar presentations


Presentation on theme: "Boolean Values The true story ;=P Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE."— Presentation transcript:

1 Boolean Values The true story ;=P Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE

2

3 Expressions

4 Relational Operators

5

6

7 Logical Operators

8 Truth Tables

9 Logical Operators

10 Negation of Logical Operator

11 Logical Operators

12 Precedence

13 Logical Operators Exercise 1 Elbow Pairs

14 Negation of Statements O Negate the statements below: O isBroken==true____________________ O phoneAge >=3_____________________ isBroken == false phoneAge < 3

15 Logical Operators Exercise 2

16 Negation of statements O Negate the statements below O x==y__________________ O y==z__________________ x != y y != z

17 Boolean Algebra

18 de Morgan’s Law Version 1

19 de Morgan’s Law Version 2

20 de Morgan’s Law

21

22 What to do? O Statement a= your Practice Its are complete O Statement b = you have an A if (!(a) || !b) { System.out.println(“Let’s get busy NOW”); }else if !(a ||b) { System.out.println(“You Have Work To Do, so get busy.”);} else System.out.println(“Program the game Pig”);


Download ppt "Boolean Values The true story ;=P Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE."

Similar presentations


Ads by Google