Hardware Reference
In-Depth Information
2 −126 and the fraction represents 2 −23 so the value is 2 −149 . This scheme provides
for a graceful underflow by giving up significance instead of jumping to 0 when
the result cannot be expressed as a normalized number.
Two zeros are present in this scheme, positive and negative, determined by the
sign bit. Both have an exponent of 0 and a fraction of 0. Here too, the bit to the
left of the binary point is implicitly 0 rather than 1.
Overflow cannot be handled gracefully. There are no bit combinations left.
Instead, a special representation is provided for infinity, consisting of an exponent
with all 1s (not allowed for normalized numbers), and a fraction of 0. This number
can be used as an operand and behaves according to the usual mathematical rules
for infinity. For example infinity plus anything is infinity, and any finite number
divided by infinity is zero. Similarly, any finite number divided by zero yields
infinity.
What about infinity divided by infinity? The result is undefined. To handle
this case, another special format is provided, called NaN ( Not a Number ). It too,
can be used as an operand with predictable results.
PROBLEMS
1. Convert the following numbers to IEEE single-precision format. Give the results as
eight hexadecimal digits.
a. 9
b. 5/32
c.
5/32
d. 6.125
2. Convert the following IEEE single-precision floating-point numbers from hex to deci-
mal:
a. 42E48000H
b. 3F880000H
c. 00800000H
d. C7F00000H
3. The format of single-precision floating-point numbers on the 370 has a 7-bit exponent
in the excess 64 system, and a fraction containing 24 bits plus a sign bit, with the bina-
ry point at the left end of the fraction. The radix for exponentiation is 16. The order of
the fields is sign bit, exponent, fraction. Express the number 7/64 as a normalized
number in this system in hex.
4. The following binary floating-point numbers consist of a sign bit, an excess 64, radix 2
exponent, and a 16-bit fraction. Normalize them.
a. 0 1000000 0001010100000001
b. 0 0111111 0000001111111111
c. 0 1000011 1000000000000000
 
Search WWH ::




Custom Search