Download presentation
Presentation is loading. Please wait.
Published byKerry Berry Modified over 9 years ago
1
Boolean Values The true story ;=P Thanks to Margaret Reid-Miller for her original ideas at Carnegie Mellon’s CSE
3
Expressions
4
Relational Operators
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
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”);
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.