Winter 2011 - January to April 2011 - Updated 2011-03-26 15:49 EDT
These documents have restricted distribution and cannot be put on the Course Home Page.
Valentine’s Day: http://www.wolframalpha.com/ - Enter this: x^2plus(y-(cuberoot(x^2)))^2=1
http://en.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange
http://en.wikipedia.org/wiki/ISO/IEC_8859 - a joint ISO and IEC series of standards for 8-bit character encodings
http://czyborra.com/charsets/iso8859.html - The ISO 8859 Alphabet Soup
http://download.oracle.com/javase/tutorial/java/nutsandbolts/op3.html - Bitwise Operators in Java
http://en.wikipedia.org/wiki/Introduction_to_Boolean_algebra
Your in-class notes go here.
Review: Famous ASCII characters: 0D 0A 20 30 41 61 7F
Problems with all the 8-bit extended-ASCII character sets
UTF-8 advantages and disadvantages
Shifting numbers right and left
Bitwise Operators AND, OR, XOR, NOT (in Java: & | ^ ~
)
&
with &&
, |
with ||
, or ~
with !
Note: All integer types in Java are signed (except char)!
>>>
Conversions between upper/lower in ASCII using bitwise OR and AND:
'A' | ' ' = 'a'
(OR turns on the 20h bit, making it lower-case)'a' & ~' ' = 'A'
(AND turns off the 20h bit, making it upper-case)Simplifying complex logic using Boolen Algebra - identities - deMorgan
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