This preview shows pages 1–3. Sign up to view the full content.
IEEE Standard 754 Floating Point Numbers
Steve
Hollasch
/ Last update 2005Feb24
IEEE Standard 754 floating point is the most common representation today for real numbers
on computers, including Intelbased PC's, Macintoshes, and most Unix platforms. This article
gives a brief overview of IEEE floating point and its representation. Discussion of arithmetic
implementation may be found in the book mentioned at the bottom of this article.
What Are Floating Point Numbers?
There are several ways to represent real numbers on computers. Fixed point places a radix
point somewhere in the middle of the digits, and is equivalent to using integers that represent
portions of some unit. For example, one might represent 1/100ths of a unit; if you have four
decimal digits, you could represent 10.82, or 00.01. Another approach is to use rationals, and
represent every number as the ratio of two integers.
Floatingpoint representation  the most common solution  basically represents reals in
scientific notation. Scientific notation represents numbers as a base number and an exponent.
For example, 123.456 could be represented as 1.23456 × 10
2
. In hexadecimal, the number
123.abc might be represented as 1.23abc × 16
2
.
Floatingpoint solves a number of representation problems. Fixedpoint has a fixed
window of representation, which limits it from representing very large or very small numbers.
Also, fixedpoint is prone to a loss of precision when two large numbers are divided.
Floatingpoint, on the other hand, employs a sort of "sliding window" of precision
appropriate to the scale of the number. This allows it to represent numbers from
1,000,000,000,000 to 0.0000000000000001 with ease.
Storage Layout
IEEE floating point numbers have three basic components: the sign, the exponent, and the
mantissa. The mantissa is composed of the
fraction
and an implicit leading digit (explained
below). The exponent base (2) is implicit and need not be stored.
The following figure shows the layout for single (32bit) and double (64bit) precision
Page 1 of 8
IEEE Standard 754 FloatingPoint
3/6/2009
mhtml:http://www.hlam.ece.ufl.edu/EEL4712/Labs/IEEEStandard754FloatingPoint.mht
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document floatingpoint values. The number of bits for each field are shown (bit ranges are in square
brackets):
The Sign Bit
The sign bit is as simple as it gets. 0 denotes a positive number; 1 denotes a negative number.
Flipping the value of this bit flips the sign of the number.
The Exponent
The exponent field needs to represent both positive and negative exponents. To do this, a
bias
is added to the actual exponent in order to get the stored exponent. For IEEE singleprecision
floats, this value is 127. Thus, an exponent of zero means that 127 is stored in the exponent
field. A stored value of 200 indicates an exponent of (200127), or 73. For reasons discussed
later, exponents of 127 (all 0s) and +128 (all 1s) are reserved for special numbers.
For double precision, the exponent field is 11 bits, and has a bias of 1023.
This is the end of the preview. Sign up
to
access the rest of the document.
This document was uploaded on 03/05/2012.
 Fall '09

Click to edit the document details