Unformatted text preview:

IEEE 754 Floating PointWhat is representedNormalizing NumbersBinary Floating PointParts of a floating point numberAbout IEEE 75432-bit Single PrecisionSome examplesDenormalized Numbers64-bit Double PrecisionInfinityNot A NumberIEEE 754 Floating PointLuddy HarrisonCS433GSpring 2007What is representedReal numbers5.67451.23 × 1019Remember however that the representation is finite, so only a subset of the reals can be representedNo trancendentalsLimited rangeLimited precision (number of digits)Normalizing NumbersIn Scientific Notation, we generally choose one digit to the left of the decimal point13.25 × 1010 becomes 1.325 × 1011Normalizing meansShifting the decimal point until we have the right number of digits to its left (normally one)Adding or subtracting from the exponent to reflect the shiftBinary Floating PointA binary number in scientific notation is called a floating point numberExamples:1.001 × 2170.001 × 2-13Parts of a floating point number±1.mmmmmmm × B±eeeeA signed fixed-point fraction (±1.mmmmmmm) called the mantissaFor non-zero mantissas, the leading 1 is implicitThat is, it is not present in the representation (bit pattern), but it is assumed to be there when interpreting the bit patternSee the previous lecture for the meaning of fixed point fractionsAn implicit base BA unsigned integer (±eeee) called the exponentAn implicit bias. The actual exponent is eeee – biasSome bit patterns are reserved for special valuesNot A Number±∞About IEEE 754This standard defines several floating point types and the meaning of operations (+, ×, etc.) on themSingleDoubleExtended PrecisionIt deals at length with the thorny questions ofErroneous and exceptional resultsRounding and conversion32-bit Single PrecisionS E M1 8 23-1S × 1.M × 2E - 127•E is an unsigned twos-complement integer. A bias of 127 is used, so that the actual exponent is E – 127.•Exponents 00000000 and 11111111 are reserved for special purposes•The sign bit of the mantissa is separated from magnitude bits of the mantissa. The mantissa is therefore an unsigned fixed point fraction with an implicit 1 to the left of the binary point.•All zero bits (S, E, and M) means zero (0). In this case there is no leading 1 mantissa bit implied.Some examples0 0 01 100 1010…00000 11111110 0000…0000= 0 (note that there is no implicit leading 1 here)= -1 × 1.101 × 24-127 = -13/8 × 2-123 = 1.0 × 2254-127 = 1 × 2127Denormalized Numbers0 00000000 0000…00010 11111110 0000…0001= 0.0000…0001 × 2-126= 1.0000…0001 × 2254-127 = 1.0000…0001 × 2127 An exponent field of zero is special; it indicates that there is no implicit leading 1 on the mantissa. This allows very small numbers to be represented. Note that we cannot normalize this value. (Why?) Zero is effectively a denorm (and it cannot be normalized – why?)Here, the mantissa has an implicit leading 1. If we wanted 0.0000…0001 × 2127 we could obtain it by writing 1.0 × 2104.64-bit Double PrecisionS E M1 11 52-1S × 1.M × 2E - 1023•E is an unsigned twos-complement integer. A bias of 1023 is used, so that the actual exponent is E – 1023.•As before, an exponent of all 0 bits or all 1 bits is reserved for special values.•As before, the mantissa is an unsigned fixed point fraction with an implicit 1 to the left of the binary point. The sign of the entire number is held separately in S.•A representation of all zero bits (S, E, and M) means zero (0). In this case there is no leading 1 mantissa bit implied.Infinity0 11111111 01 11111111 0= +∞= -∞Not A Numberx 11111111 ≠0x 11111111 1xxx…xxxxQuiet NaNx 11111111 0xxx…xxxx ≠ 0Signalling


View Full Document

U of I CS 433 - Floating Point

Download Floating Point
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Floating Point and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Floating Point 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?