This preview shows page 1. Sign up to view the full content.
Unformatted text preview: he sign bit (0 = positive and 1 = negative; bits 0 through 6 of byte 10 are don't care bits). Negative decimal integers are not stored in two's complement form; they are distinguished from positive decimal integers only by the sign bit. The range of decimal integers that can be encoded in this format is 1018 + 1 to 1018 1. The decimal integer format exists in memory only. When a decimal integer is loaded in an x87 FPU data register, it is automatically converted to the double-extendedprecision floating-point format. All decimal integers are exactly representable in double extended-precision format. Table 4-4 gives the possible encodings of value in the decimal integer data type. 4-12 Vol. 1 DATA TYPES Table 4-4. Packed Decimal Integer Encodings
Magnitude Class Positive Largest Sign 0 . . Smallest Zero Negative Zero Smallest 0 0 1 1 . . Largest Packed BCD Integer Indefinit e 1 1 0000000 . . 0000000 0000000 0000000 0000000 . . 0000000 1111111 1001 1111 1001 1111 0000 0000 0000 0000 0000 0000 0000 0000 digit 1001 digit 1001 digit 1001 . . 0000 0000 0000 0000 . . 1001 1100 1001 0000 ... ... 1001 0000 0000 0000 0000 0000 ... ... ... ... 0001 0000 0000 0001 digit 1001 ... ... digit 1001 1 byte 9 bytes The packed BCD integer indefinite encoding (FFFFC000000000000000H) is stored by the FBSTP instruction in response to a masked floating-point invalid-operation exception. Attempting to load this value with the FBLD instruction produces an undefined result. 4.8 REAL NUMBERS AND FLOATING-POINT FORMATS This section describes how real numbers are represented in floating-point format in x87 FPU and SSE/SSE2/SSE3 floating-point instructions. It also introduces terms such as normalized numbers, denormalized numbers, biased exponents, signed zeros, and NaNs. Readers who are already familiar with floating-point processing techniques and the IEEE Standard 754 for Binary Floating-Point Arithmetic may wish to skip this section. Vol. 1 4-13 DATA TYPES 4.8.1 Real Number System As shown in Figure 4-10, the real-number system comprises the continuum of real numbers from minus infinity (- ) to plus infinity (+ ). Because the size and number of registers that any computer can have is limited, only a subset of the real-number continuum can be used in real-number (floating-point) calculations. As shown at the bottom of Figure 4-10, the subset of real numbers that the IA-32 architecture supports represents an approximation of the real number system. The range and precision of this real-number subset is determined by the IEEE Standard 754 floating-point formats. 4.8.2 Floating-Point Format To increase the speed and efficiency of real-number computations, computers and microprocessors typically represent real numbers in a binary floating-point format. In this format, a real number has three parts: a sign, a significand, and an exponent (see Figure 4-11). The sign is a binary value that indicates whether the number is positive (0) or negative (1). The significand has two parts: a 1-bi...
View Full Document
- Winter '11