Académique Documents
Professionnel Documents
Culture Documents
Warm-up
A Little Boolean Review
DeMorgans Laws:
!(P&&Q) = !P || !Q
!(P || Q) = !P && !Q
Warm-up
A Little Boolean Review
! (x > = y ) = _______________
! (x>y)
= _______________
Warm-up
A Little Boolean Review
Use DeMorgans Law to change these:
Warm-up
A Little Boolean Review
Use DeMorgans Law to change these:
More Boolean!
(y>10000) || ( x>1000 && x<1500 )
(x==y) != (x==z)
(x==y) != (x==z)
The value of the left side and the right side cant be
the same. They must be Not Equal. One side must
be true and the other side must be false.
(x==y) != (x==z)
Since x = y or x = z, but x doesnt equal y and z. If
all three are equal, then both the left and right would
be true, and would not meet the != condition
(x==y) != (x==z)
Furthermore, if all three are different, then both the
left and right side would be false, which means they
dont meet the != condition.
(x==y) != (x==z)
Conclusion: x is equal to either y or z. Does this
condition make the two statements above true?
(x==y) != (x==z)
(x==y) != (x==z)
(x==y) != (x==z)
(x==y) != (x==z)
(x==y) != (x==z)
(x==y) != (x==z)
(x==y) != (x==z)
You may figure out the condition that make the last
statement false and follow the same steps to compare
those conditions to the other two statements
(x==y) != (x==z)
Hint: This statement is false only if
* all three are the same,
* all three are different,
* or y = z but not x.
De Morgans Laws
!(a&&b) = !a || !b
!(a || b) = !a && !b
A.
B.
C.
D.
E.
A.
B.
C.
D.
E.
A.
B.
C.
D.
E.
!(x<=y) || (y>0)
x>y && y<=0
x<=y || y>0
x>y || y<0
x<=y && y<=0
A.
B.
C.
D.
E.
!(x<=y) || (y>0)
x>y && y<=0
x<=y || y>0
x>y || y<0
x<=y && y<=0
(x&&y) || z
(x || y) && z
y || (x&&z)
x || (y && z)
x && (y || z)
(x&&y) || z
(x || y) && z
y || (x&&z)
x || (y && z)
x && (y || z)
A.
B.
C.
D.
E.
!(c && d)
!(c && !d)
c && !d
!(c || !d)
!(!c && d)
A.
B.
C.
D.
E.
!(c && d)
!(c && !d)
c && !d
!(c || !d)
!(!c && d)
A.
B.
C.
D.
E.
A.
B.
C.
D.
E.