02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Representation of Numbers 265<br />

IEEE 754 standard In the early days of the digital computer revolution,<br />

each processor design had its own internal representation for floatingpoint<br />

numbers. Since floating-point arithmetic is more complicated to<br />

implement, some of these designs did incorrect arithmetic. Therefore, in<br />

1985 IEEE issued a standard (IEEE standard 754-1985 or IEEE-754 for<br />

short) to allow floating-point data exchange among different computers<br />

and to provide hardware designers with a model known to be correct. Currently,<br />

almost all manufacturers design main processors or a dedicated<br />

coprocessor for floating-point operations using the IEEE-754 standard<br />

representation.<br />

The IEEE 754 standard defines three formats for binary numbers: a<br />

32-bit single precision format, a 64-bit double precision format, and an<br />

80-bit temporary format (which is used internally by the processors or<br />

arithmetic coprocessors to minimize rounding errors).<br />

We will briefly describe the 32-bit single precision standard. This<br />

standard has many similarities with the floating-point representation discussed<br />

above, but there are also differences. Remember, this is another<br />

model advocated by IEEE. The form of this model is<br />

ˆx =<br />

sign of M<br />

↓<br />

± xx ···x<br />

} {{ }<br />

8−bit E<br />

<br />

xx ···x<br />

} {{ }<br />

23−bit M<br />

(6.44)<br />

The mantissa’s value is called the significand in this standard. Features<br />

of this model are as follows:<br />

• If the sign bit is 0, the number is positive; if the sign bit is 1, the<br />

number is negative.<br />

• The exponent is coded in 8-bit excess-127 (and not 128) format. Hence<br />

the uncoded exponents are between −127 and 128.<br />

• The mantissa is in 23-bit binary. A normalized mantissa always starts<br />

with a bit 1, followed by the binary point, followed by the rest of the<br />

23-bit mantissa. However, the leading bit 1, which is always present in a<br />

normalized mantissa, is hidden (not stored) and needs to be restored for<br />

computation. Again, note that this is different from the usual definition<br />

of the normalized mantissa. If all the 23 bits representing the mantissa<br />

are set to 0, the significand is 1 (remember the implicit leading 1). If<br />

all 23 bits are set to 1, the significand is almost 2 (in fact 2 − 2 −23 ). All<br />

IEEE 754 normalized numbers have a significand that is in the interval<br />

1 ≤ M

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!