標題:
Floating point
發問:
此文章來自奇摩知識+如有不便請留言告知
1). What is the binary pattern to represent the floating point value -15 using the IEEE 32-bit format. The exponent is 8-bit and trailing zeros are not shown ?
最佳解答:
What is the binary pattern to represent the floating point value -15 using the IEEE 32-bit format. The exponent is 8-bit and trailing zeros are not shown ? The answer is :1 10000010 111 (00000000000000000000) Bit 31 (left-most bit) is the sign bit (0 is positive, 1 is negative). Bit 30-23 are the exponent. It is a binary number representing excess 127. Bits 22-0 are the mantissa. -15 = -1111 = -1.111 x 2^3 (1) Sign bit Bit 31 is 1 because -15 is negative. (2) Exponent The exponent is 3 (base 10) = 11 (base 2) Fix the exponent by adding 127 (base 10) = 01111111 (base 2) 11 + 01111111 = 10000010 Bits 30-23 is 10000010. (3) Mantissa The fractional part is 111. Bits 22-0 is 11100000000000000000000. Therefore the resulting number in IEEE 32-bit standard format is : 1 10000010 11100000000000000000000
其他解答:
留言列表