Fall 2011 - September to December 2011 - Updated 2011-11-04 23:49 EDT
' '
character is an ASCII SP
(space):
'A' + ' ' = '?' = 0x??
'A' | ' ' = '?' = 0x??
'a' + ' ' = '?' = 0x??
(this will not be ASCII - how can you tell?)'a' | ' ' = '?' = 0x??
These documents have restricted distribution and cannot be put on the Course Home Page.
http://en.wikipedia.org/wiki/Introduction_to_Boolean_algebra
http://download.oracle.com/javase/tutorial/java/nutsandbolts/op3.html - Bitwise Operators in Java
http://en.wikipedia.org/wiki/Virtual_memory - see “Avoiding thrashing”
Your in-class notes go here.
What you might need is a Binary Watch - see image.
& | ^ ~
)
&
with &&
, |
with ||
, or ~
with !
a&b
? what is a|b
? what is a^b
? what is ~a
?a&b
? what is a|b
? what is a^b
? what is ~a
?>>>
'A' | ' ' = 'a'
(OR turns on the 20h bit, making it lower-case)'a' & ~' ' = 'A'
(AND turns off the 20h bit, making it upper-case)if ((x < y) && (y < z))
||
((x < y) && (y >=z ))
if (x < y)
because:a = (x<y)
and b = (y<z)
, therefore b' = (y>=z)
ab+ab' = a(b+b') = a(1) = a = (x<y)
date > 120
and amount > 0
print if NOT
(date > 120 && amt > 0)
print if
(date <= 120 || amt <= 0)
print unless
(stale and amt < 0)
print if NOT
(stale && amt < 0)
print if
( !stale || amt >= 0)
print if
( date <= 120 || amt <= 0 || amt >= 0)
print if
( date <= 120 || TRUE )
(xy + x'z + yz')' = y'(x+z')
(x'+y')(x+z')(y'+z) -
- deMorgan(x'x + x'z' + xy' + y'z')(y'+z) -
- expand first two expressions( 0 + x'z' + xy' + y'z')(y'+z) -
- identitiesx'y'z' + x'z'z + xy'y' + xy'z + y'y'z' + y'z'z -
- expand againx'y'z' + 0 + xy' + xy'z + y'z' + 0 -
- identitiesx'y'z' + y'z' + xy' + xy'z -
- regroup similar termsy'z' + xy' -
- absorption ruley'(x+z') -
- QED