Information Technology Reference
In-Depth Information
promise, the storage of real numbers in fixedstorage systems involves
keeping track of both a specified number of significant digits and the
power of two used for the first label (the digit furthest to the left). For
example, if storage kept track of six significant binary digits, then we
might store 100110 in our example, as well as the exponent 2 for the
first digit's label. In this case, the final digit (representing 1/16) would
not fit in the storage space available, and thus would be lost—compro
mising accuracy. For the six significant binary digits, we have only six
binary digits of accuracy, and the seventh digit is lost. Storing data in
this way, therefore, can potentially have a serious impact on accuracy.
In this example, think about starting with the stored digits
100110, and then having the binary point “float” over the digits ac
cording to the stored exponent. Although this imagery may seem pe
culiar, it does explain (at least partially) why real numbers in com
puters are usually called floating-point numbers . Floatingpoint
numbers are any numbers with a decimal point or radix point.
For technical convenience, actual computers make some adjust
ments in both the digits stored and the exponent, but the basic idea
is just as described. In common modern standards, either 32 bits or
64 bits are used for floatingpoint numbers, as follows:
32 bits (or singleprecision floatingpoint numbers):
1 bit for a or sign
23 bits for the digits of the number
8 bits for the exponent
64 bits (or doubleprecision floatingpoint numbers):
1 bit for a or sign
52 bits for the digits of the number
11 bits for the exponent
As a technical detail, these floatingpoint numbers do not store
a number's first nonzero digit, because that digit will always be 1.
Thus, singleprecision and doubleprecision numbers represent 24
binary bits and 52 binary bits of accuracy, respectively. Inaccuracies
in the representation of numbers would appear first in the 25th or
53rd binary digit, respectively.
Comparing binary accuracy to decimal accuracy requires a bit
more mathematics than we have space for here, but the following
can give an idea.
Search WWH ::




Custom Search