This preview shows page 1. Sign up to view the full content.
Unformatted text preview: The consistency problem was greatly aided by the introduction in 1985 of the IEEE Standard for Binary FloatingPoint Arithmetic (ANSI/ IEEE Standard 7541985, sometimes referred to simply as IEEE 754) which defines in considerable detail how floatingpoint numbers should be represented, the accuracy with which calculations should be performed, how errors should be detected and returned, and so on. The most compact representation of a floatingpoint number defined by IEEE 754 is the 32bit 'single precision' format: Single precision Figure 6.1 IEEE 754 single precision floatingpoint number format. The number is made up from a sign bit ('S'), an exponent which is an unsigned integer value with a 'bias' of+127 (for normalized numbers) and a fractional component. A number of terms in the previous sentence may be unfamiliar. To explain them, let us look at how a number we recognize,' 1995', is converted into this format. We start from the binary representation of 1995, which has already been presented: 11111001011 This is a positive number, so the S bit will be zero. Normalized numbers The first step is to normalize the number, which means convert it into the form shown in Equation 13 on page 158 where 1 <a<2 and b = 2. Looking at the binary form of the number, a can be constrained within this range by inserting a 'binary point' (similar in interpretation to the more familiar decimal point) after the first' 1'. The implicit position of the binary point in the binary integer representation is to the right of the rightmost digit, so here we have to move it left ten places. Hence the normalized representation of 1995 is: 1995 = 1.111100101 Ix210 Equation 14 where a and n are both in binary notation. When any number is normalized, the bit in front of the binary point in a will be a ' 1' (otherwise the number is not normalized). Therefore there is no need to store this bit. 160 Architectural Support for HighLevel Languages Exponent bias Finally, since the format is required to represent very small numbers as well as very large ones, some numbers...
View
Full
Document
 Spring '09
 Staff

Click to edit the document details