The IEEE (Institute of Electrical and Electronics Engineers) has produced a standard for floating point arithmetic. This standard specifies how single precision (32 bit) and double precision (64 bit) floating point numbers are to be represented, as well as how arithmetic should be carried out on them.
The IEEE single precision floating point standard representation requires a 32 bit word, whose bits may be represented as numbered from 0 to 31, left to right. The first bit is the sign bit, S, the next eight bits are the exponent bits, 'E', and the final 23 bits are the fraction 'F':
S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF 0 1 8 9 31The most significant bits are on the left.
The value V represented by the word may be determined as follows:
In particular:
0 00000000 00000000000000000000000 = 0 0 00000000 00000000000000000000001 = +1 * 2( -126) * 0.000000000000000000000012 = 2(-149) (Smallest positive value) 0 00000000 10000000000000000000000 = +1 * 2( -126) * 0.12 = 2**(-127) 0 00000001 00000000000000000000000 = +1 * 2( 1-127) * 1.02 = 2**(-126) 0 10000000 00000000000000000000000 = +1 * 2(128-127) * 1.02 = 2 0 10000001 10100000000000000000000 = +1 * 2(129-127) * 1.1012 = 6.5 0 11111110 11111111111111111111111 = +1 * 2(254-127) * 1.111111111111111111111112 (Most positive finite value) 0 11111111 00000000000000000000000 = Infinity 0 11111111 00000100000000000000000 = NaN 1 00000000 00000000000000000000000 = -0 1 10000000 00000000000000000000000 = -1 * 2(128-127) * 1.02 = -2 1 10000001 10100000000000000000000 = -1 * 2(129-127) * 1.1012 = -6.5 1 11111110 11111111111111111111111 = -1 * 2(254-127) * 1.111111111111111111111112 (Most negative finite value) 1 11111111 00000000000000000000000 = -Infinity 1 11111111 00100010001001010101010 = NaN
The IEEE double precision floating point standard representation requires a 64 bit word, which may be represented as numbered from 0 to 63, left to right. The first bit is the sign bit, S, the next eleven bits are the exponent bits, 'E', and the final 52 bits are the fraction 'F':
S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0 1 11 12 63
The value V represented by the word may be determined as follows:
You can return to the HTML web page.