

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Real numbers are represented as floating point numbers inside computers. A floating point number can be written in binary form as
x = (โ1)s 2 E^ (b 0 .b 1 b 2... bpโ 1 ).
Bit strings are utilized to represent the sign s, the exponent E, and the mantissa b 1... bpโ 1 , whereas b 0 is usually implicit. IEEE arithmetic includes two kinds of floating point numbers: single precision (32 bits long) and double precision ( bits long).
The bit structure for a 32-bit IEEE single precision is shown below.
s e (^) f 1 8 23 sign exponent mantissa
Among these 32 bits, 1 bit is assigned to the sign s, 8 bits are assigned to the exponent e, and the remaining 23 bits (b 1... b 23 ) to the mantissa f. The value of b 0 is implicit.
Five combinations of s, e, f are utilized to represent five different types of infor- mation.
x = (โ1)s^ (1.f ) 2 2 eโ^127.
In this situation, b 0 is implicitly 1 and f may or may not be 0. โDepartment of Mathematics Colorado State University Fort Collins, CO 80523-
Clearly, the smallest floating point number (in terms of absolute value) is
(1.0000 0000 0000 0000 0000 000) 2 2 โ^126 โ 1. 1755 ร 10 โ^38.
The largest floating point number is
(1.1111 1111 1111 1111 1111 111) 2 2127 = (2 โ 2 โ^23 ) ร 2127 โ 3. 4028 ร 1038.
In addition, the smallest unit in the 23-bit mantissa is 2โ^23 โ 1. 1921 ร 10 โ^7. So we have only 6 accurate figures in the decimal representation. These may not be enough for some scientific computing, and hence double precision is needed.
Among the 64 bits for a double precision floating number, again, only 1 bit is needed for the sign s. Now 11 bits are used for the exponent e, and the remaining 52 bits are assigned to the mantissa f. As we expected, the exponent 00000000000 and 11111111111 are reserved. Also, the exponent inside the computer is a biased exponent. We have (00000000001) 2 corresponding to (โ1022) 10 and (11111111110) 2 corresponding to (1023) 10.
Single precision has only 6 accurate decimal figures whereas double precision has 15 accurate decimal figures.
On a 32-bit computer, one word is 4 bytes, i.e., 32-bits. So all operations on single precision floating numbers can be implemented by the hardware. On the contrary, double precision floating arithmetics have to be implemented through softwares and hence much slower.