In: Computer Science
The biggest mysteries of the IEEE 754 Floating-Point Representation are “hidden bit” and “Bias.
Can someone explain to me why the "hidden bits" and "bias" are considered to be mysteries for the IEEE 754 floating point representation
FLOATING POINT REPRESENTATIONS:
It is assumed that the student is familiar with the discussion in
Appendix B of the text by A. Tanenbaum,
Structured Computer Organization, 4th Ed., Prentice-Hall, 1999.
Here we are concerned in particular with
the discussion of floating-point numbers and normalization in pp.
643-651.In the notation used here
floating point representations for real numbers have the
form:
+-M x R^+-E
Here M is a signed mantissa, R is the radix of normalization,
and E is a signed exponent. It is the signed
values M and E that are typically packed into computer \words" of
varying length to encode single, double,
and extended precision (short, long, and extended) floating point
numbers. The number of bits used in the
representation of M determines the precision of the representation.
The number of bits used to represent
the signed value E determines the range of the representation. Only
a finite number of values among those
in the representable range can be encoded in the n bits available,
and this number is determined by the
precision.
Positive and negative floating point numbers are usually
represented in one of two ways depending on the
computer's choice of arithmetic circuitry and representation for
fixed point numbers. Machines that use one's
complement representations for fixed point numbers and have one's
complement adders in their arithmetic units typically pack the
positive floating point number into one (or more) word(s) and then
complement all bits in this (these) word(s) to represent the
negative floating point number.
Examples of these one's complement representations include the
UNIVAC 1100 series machines and the CDC 6600, CYBER 70 series
and successor machines.
IEEE Floating Point Standard 754:
The IEEE Floating Point Standard uses four (or eight) 8-bit
bytes to represent floating point numbers in machines whose
fixed-point data use a two's complement representation for negative
integers and that have
two's complement arithmetic circuitry.
A single precision floating point datum is packed into four
consecutive 8-bit bytes viewed as a single 32-bit
representation.
A double precision floating point datum is packed into eight
consecutive 8-bit bytes viewed as a single 64-bit representation,
where the bits in the second 32-bits (or second set of four bytes)
is continuation of the low order bits in the mantissa (called the
significant).
The mantissa (or significand) is a binary normalized mixed number
(with integer and fraction parts) of the form 1:xxxx2 .
A single precision datum has an 8-bit characteristic that
represents a signed exponent with bias (excess) (128 1)10 = 12710,
and a double precision datum has an 11-bit characteristic that
represents the signed exponent excess (1024 1)10 = 102310. Negative
floating-point numbers are represented in a sign-magnitude format
by packing the positive representation into the single (or double)
precision format and then setting the SM bit only to one. Of the
32-bits used to represent single precision numbers only 23 remain
in which to represent the binary normalized mixed number. Because
every number is assumed normalized in the form 1:xxxx2 2^+-E, there
is no need to represent the leading one and so only the x's in the
fraction are put into the 23 remaining bits in the word, resulting
in 24 bits of precision.
We imagine that the leading one lies under and is hidden by an
opaque characteristic field; it is therefore, called a "hiddin
bit"
When unpacking a floating-point number for output conversion or for
arithmetic manipulation, the hidden bit must be inserted at its
rightful place in order to become visible again.
A 32-bit (or 64-bit) floating-point word comprising four (or eight)
bytes with all zeros is the representation for floating-point +0 by
definition.
In addition to defining formats for normalized floating point
representations and zero, the standard also specifies valid formats
for denormalized numbers, infinity, and quantities that are not a
number
(e.g., see A.Tanenbaum, Structured Computer Organization, 3rd Ed.,
Prentice-Hall, 1990, pp.565{572).
Precision of A floating-point representation:
In the IEEE-754 single precision floating-point representation, the
mantissa is 23 bits long. This means that any two numbers in this
representation cannot be closer than
1/2^23 = 1.1920928955078125*10^-7.
In double precision, this difference reduces to
1/2^52 =
2.220446049250313080847263336181640625*10^-16.