Forget two's complement here. You are clinging to it, and that is erroneous. It plays no role in the IEEE floating format.
Your book is wrong, but not with regard to the largest representable floating point value. The problem is the smallest. It ignores the denormalized numbers.
The exponent of a 64 bit floating point comprises 11 bits. Interpreted as a raw unsigned integer, the exponent
e takes on integer values between 0 to 2047 inclusive. Following is how those values are interpreted:
- e=2047.
This special value is reserved for representing infinities and non-numbers ("not a number", or NaN). Hopefully your text discusses these concepts.
- 1≤e≤2046.
This range of exponents is used for normalized numbers. The corresponding real value is ##1.b_0b_1...b_{51}\times 2^{e-1023}##. In other words, the 52 bits that comprise the mantissa are interpreted as the binary fractional part of the base two equivalent of scientific notation. An implied leading 1 precedes this fractional part. The resulting number is then multiplied by ##2^{e-1023}##.
- e=0.
This special value is reserved for representing denormalized numbers. These are conceptually similar to the normalized numbers, but with two changes.
- The leading implied one becomes a leading implied zero.
- The exponent is -1022 rather than -1023 as would be implied by the expression ##e-1023##.
This means the largest representable positive number has an exponent
e=2046 and a mantissa of all ones. This corresponds to ##(2-2^{-52}) \times 2^{1023}##, or about ##1.7976931348623157 \times 10^{308}##. The smallest possible normalized positive number is ##1 \times 2^{-1022}##, or about ##2.2250738585072014 \times 10^{-308}##. This is not the smallest possible representable positive number. For that you need to look to the denormalized numbers. The smallest representable number has an exponent of zero and a mantissa that is all zeros except for the least significant bit. This has a value of ##1 \times 2^{-1074}##, or about ##4.9406564584124654 \times 10^{-324}##.