1Conceptual Review¶
Solution to Exercise 1 #
True. Floating point:
Provides support for a wide range of values. (Both very small and very large)
Helps programmers deal with errors in real arithmetic because floating point can represent , , (Not a Number)
Keeps high precision. Recall that precision is a count of the number of bits in a computer word used to represent a value. IEEE 754 allocates a majority of bits for the significand, allowing for the use of a combination of negative powers of two to represent fractions.
Solution to Exercise 2 #
False. Floating Point can represent infinities as well as NaNs, so the total amount of representable numbers is lower than Two’s Complement, where every bit combination maps to a unique integer value.
Solution to Exercise 3 #
True. The uneven spacing is due to the exponent representation of floating point numbers. There are a fixed number of bits in the significand. In IEEE 32-bit storage there are bits for the significand, which means the LSB represents times 2 to the exponent. For example, if the exponent is zero (after allowing for the offset) the difference between two neighboring floats will be . If the exponent is , the difference between two neighboring floats will be because the mantissa is multiplied by . Limited precision makes binary floating-point numbersdiscontinuous; there are gaps between them.
Solution to Exercise 4 #
False. Because of rounding errors, you can find Big and Small numbers such that: (Small + Big) + Big != Small + (Big + Big)
FP approximates results because it only has 23 bits for the significand.
Solution to Exercise 5 #
A non-zero digit is required prior to the radix in scientific notation, and since the only non-zero digit in base-2 is 1, the normalized value will always start with a 1.