-------------------------
Week 04 Notes for DAT2343
-------------------------
-Ian! D. Allen - idallen@idallen.ca - www.idallen.com
Overflow causes rocket to self-destruct
---------------------------------------
- http://en.wikipedia.org/wiki/Ariane_5_Flight_501
"a data conversion from a 64-bit floating point to 16-bit signed
integer value caused a hardware exception (more specifically, an
arithmetic overflow, as the floating point number had a value too
large to be represented by a 16-bit signed integer)"
Calculators are not permitted during the first midterm test. You will
benefit from knowing the powers of two from 2**(-4) to 2**16 and the
decimal and binary values of the hexadecimal digits from zero to fifteen.
Of course you can work them out; however, having at least some of them
memorized will make things go faster for you on the test.
(Remember that hexadecimal "A" = decimal 10 = binary 1010.)
Lecture Notes for This Week
- From Blackboard Course Documents (publisher-restricted distribution): 02.ppt
- you do not need to know how to do math with sign-magnitude numbers
- you do need to know how to convert them to/from decimal
- you do not need to know how to do math with one's complement numbers
- you do need to know how to convert them to/from decimal
- you need to know how to do addition with two's complement numbers
- you also need to know how to convert them to/from decimal
- you do not have to multiply or divide or subtract any binary numbers
- omit "Booth's algorithm"
- omit most of the math in 2.8 "Error Detection and Correction"
- ignore slides 62-70 (the "simplified" model)
- ignore slides 75-76 (floating-point multiplication)
- you do not need to know how to convert IEEE 754 single-precision
to/from decimal, but you must understand "range" and "precision" and the
range limit for IEEE 754 single-precision.
- you do not need to know anything about double-precision IEEE 754 or
about the toy format they use in the lecture slides
- ignore slides 91-115 (error detection and correction)
- ignore half of slide 117 (error detection and correction)
- use my web pages instead
- http://en.wikipedia.org/wiki/Integer_overflow
- http://en.wikipedia.org/wiki/Arithmetic_overflow
- http://en.wikipedia.org/wiki/Arithmetic_underflow
- 060_different_binary_integers.html Representation for 4-bit Signed
Integers in Different Systems
- 070_integer_encoding_practice.html Integer Encoding Practice
- 120_CharacterEncoding.html Character Encoding
- 130_big_picture.txt The Big Picture on Bit Patterns
- 140_attack.txt Remote Attack Script uses hexadecimal obfuscation
- 145_textbook_secrets.txt Alcatel-Lucent Traning Manual containing
secret messages in hexadecimal
- From Blackboard Course Documents (publisher-restricted distribution): 03.ppt
* Boolean Logic (including deMorgan)
- ignore slides: 19-73, 75-76
References:
- http://en.wikipedia.org/wiki/IEEE_754-1985
- http://en.wikipedia.org/wiki/IEEE_754
- http://en.wikipedia.org/wiki/Ariane_5_Flight_501
IEEE 754 Converter:
- http://babbage.cs.qc.cuny.edu/IEEE-754/Decimal.html
For anyone doing significant work in floating-point:
"What Every Computer Scientist Should Know About Floating-Point Arithmetic"
- http://www.validlab.com/goldberg/paper.pdf
--
| Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada
| Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/