HOME

TheInfoList



OR:

In
IEEE 754 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic originally established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard #Design rationale, add ...
floating-point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
numbers, the
exponent In mathematics, exponentiation, denoted , is an operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication of the base: that is, i ...
is biased in the engineering sense of the word – the value stored is offset from the actual value by the exponent bias, also called a biased exponent. Biasing is done because exponents have to be signed values in order to be able to represent both tiny and huge values, but
two's complement Two's complement is the most common method of representing signed (positive, negative, and zero) integers on computers, and more generally, fixed point binary values. Two's complement uses the binary digit with the ''greatest'' value as the ''s ...
, the usual representation for signed values, would make comparison harder. To solve this problem the exponent is stored as an unsigned value which is suitable for comparison, and when being interpreted it is converted into an exponent within a signed range by subtracting the bias. By arranging the fields such that the sign bit takes the most significant bit position, the biased exponent takes the middle position, then the
significand The significand (also coefficient, sometimes argument, or more ambiguously mantissa, fraction, or characteristic) is the first (left) part of a number in scientific notation or related concepts in floating-point representation, consisting of its s ...
will be the least significant bits and the resulting value will be ordered properly. This is the case whether or not it is interpreted as a floating-point or integer value. The purpose of this is to enable high speed comparisons between floating-point numbers using fixed-point hardware. If there are E bits in the exponent, the bias is typically set as b = 2^-1. Therefore, the possible integer values that the biased exponent can express lie in the range -b, b/math>. To understand this range, with E bits in the exponent, the possible unsigned integers lie in the range , 2^-1/math>. However, the strings containing all zeros and all ones are reserved for special values, so the expressible integers lie in the range , 2^-2/math>. It follows that: * The maximum biased value is (2^-2) - b = 2b - b = b. * The minimum biased value is 1 - b. When interpreting the floating-point number, the bias is subtracted to retrieve the actual exponent. * For a half-precision number, the exponent is stored in the range (0 and 31 have special meanings), and is interpreted by subtracting the bias for a 5-bit exponent (15) to get an exponent value in the range . * For a
single-precision Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point. A floati ...
number, the exponent is stored in the range (0 and 255 have special meanings), and is interpreted by subtracting the bias for an 8-bit exponent (127) to get an exponent value in the range . * For a
double-precision Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point. Double prec ...
number, the exponent is stored in the range (0 and 2047 have special meanings), and is interpreted by subtracting the bias for an 11-bit exponent (1023) to get an exponent value in the range . * For a quadruple-precision number, the exponent is stored in the range (0 and 32767 have special meanings), and is interpreted by subtracting the bias for a 15-bit exponent (16383) to get an exponent value in the range . * For an octuple-precision number, the exponent is stored in the range (0 and 524287 have special meanings), and is interpreted by subtracting the bias for a 19-bit exponent (262143) to get an exponent value in the range .


History

The floating-point format of the
IBM 704 The IBM 704 is the model name of a large digital computer, digital mainframe computer introduced by IBM in 1954. Designed by John Backus and Gene Amdahl, it was the first mass-produced computer with hardware for floating-point arithmetic. The I ...
introduced the use of a biased exponent in 1954.


See also

*
Offset binary Offset binary, also referred to as excess-K, excess-''N'', excess-e, excess code or biased representation, is a method for signed number representation where a signed number n is represented by the bit pattern corresponding to the unsigned numb ...
(also referred to as excess-K)


References

{{DEFAULTSORT:Exponent Bias Computer arithmetic