------------------------- Week 04 Notes for DAT2343 ------------------------- -Ian! D. Allen - idallen@idallen.ca - www.idallen.com Review: Answers for Assignment 2 are posted and reviewed. Assignment 3 is assigned, due next week. Lecture Notes for This Week 07AlternativeBinaryRepresentations.html 08Basic_Character_Encoding.wmv - Errata: end-of-line: Mac uses only CR, Unix uses only LF 08Basic_Character_Encoding.ppt - Errata: end-of-line: Mac uses only CR, Unix uses only LF 08CharacterEncoding.htm - EBCDIC will only be quizzed in Homework assignments, not on tests 09ByteOrderEndian.html 10FloatingPoint.htm 10Summary_of_Basic_Data_Encoding.pps - omit EBCDIC, Zoned Decimal, Packed Decimal, and BCD 10Summary_of_Basic_Data_Encoding.ppt - omit EBCDIC, Zoned Decimal, Packed Decimal, and BCD 10big_picture.txt 10ieee754_conversions.txt 04bit_operations.txt (re-visit using bit masks with IEEE754 and ASCII) Notes ------ Floating Point: Reference URL: http://steve.hollasch.net/cgindex/coding/ieeefloat.html The range of IEEE754 single-precision floating-point is approximately: -2**127 to +2**127 -or- -10**38 to +10**38 (approximately) Floating-point underflow happens for IEEE754 single-precision floating-point values closer to zero than approximately 2**(-127) which is approximately 10**(-38) Floating-point overflow happens for IEEE754 single-precision floating-point values greater than approximately 2**(127) which is approximately 10**(38). The exact values are a bit complicated to explain due to the use of special "denormalized" formats; see the above URL for details. Q: How can you tell if bit pattern 0x5A5A is ASCII or a number? A: You can't. Bits are just bits. Your program has to know what it put there. Review the Class Notes file 04bit_operations.txt - bitwise AND, bitwise OR, biwise NOT, masking - word length affects bitwise NOT (why?) - understand Java/C language bit expressions, e.g. char x = ~0x7; http://www.janeg.ca/scjp/oper/unary.html Assignments Assigned This Week assignment03.txt due next week in Digital Dropbox