Table 9.1 Characteristics of Twos Complement Representation and Arithmetic Range –2n–1 through 2n–1 – 1 Number of Representations of Zero One Negation Take the Boolean complement of each bit of the corresponding positive number, then add 1 to the resulting bit pattern viewed as an unsigned integer. Expansion of Bit Length Add additional bit positions to the left and fill in with the value of the original sign bit. Overflow Rule If two numbers with the same sign (both positive or both negative) are added, then overflow occurs if and only if the result has the opposite sign. Subtraction Rule To subtract B from A, take the twos complement of B and add it to A.Table 9.2 Alternative Representations for 4-Bit Integers Decimal Representation Sign-Magnitude Representation Twos Complement Representation Biased Representation +8 — — 1111 +7 0111 0111 1110 +6 0110 0110 1101 +5 0101 0101 1100 +4 0100 0100 1011 +3 0011 0011 1010 +2 0010 0010 1001 +1 0001 0001 1000 +0 0000 0000 0111 –0 1000 — — –1 1001 1111 0110 –2 1010 1110 0101 –3 1011 1101 0100 –4 1100 1100 0011 –5 1101 1011 0010 –6 1110 1010 0001 –7 1111 1001 0000 –8 — 1000 —Table 9.3 IEEE 754 Format Parameters Format Parameter Single Single Extended Double Double Extended Word width (bits) 32 ≥ 43 64 ≥ 79 Exponent width (bits) 8 ≥ 11 11 ≥ 15 Exponent bias 127 unspecified 1023 unspecified Maximum exponent 127 ≥ 1023 1023 ≥ 16383 Minimum exponent –126 ≤ –1022 –1022 ≤ –16382 Number range (base 10) 10–38, 10+38 unspecified 10–308, 10+308 unspecified Significand width (bits)* 23 ≥ 31 52 ≥ 63 Number of exponents 254 unspecified 2046 unspecified Number of fractions 223 unspecified 252 unspecified Number of values 1.98 × 231 unspecified 1.99 × 263 unspecified * not including implied bitTable 9.5 Floating-Point Numbers and Arithmetic Operations Floating Point Numbers Arithmetic Operations X = Xs× BXEY = Ys× BYE X + Y = Xs× BXE−YE+ Ys( )× BYEX − Y = Xs× BXE−YE− Ys( )× BYE XE≤ YEX × Y = Xs× Ys( )× BXE+YEXY=XsYs × BXE−YE Examples: X = 0.3 × 102 = 30 Y = 0.2 × 103 = 200 X + Y = (0.3 × 102–3 + 0.2) × 103 = 0.23 × 103 = 230 X – Y = (0.3 × 102–3 – 0.2) × 103 = (–0.17) × 103 = –170 X × Y = (0.3 × 0.2) × 102+3 = 0.06 × 105 = 6000 X ÷ Y = (0.3 ÷ 0.2) × 102–3 = 1.5 × 10–1 = 0.15Table 9.6 Operations that Produce a Quiet NaN Operation Quiet NaN Produced by Any Any operation on a signaling NaN Add or subtract Magnitude subtraction of infinities: (+∞) + (–∞) (–∞) + (+∞) (+∞) – (+∞) (–∞) – (–∞) Multiply 0 × ∞ Division 00or∞∞ Remainder x REM 0 or ∞ REM y Square root x where x <
View Full Document