浮点型变量的值使用单精度32位浮点格式IEEE-754标准表示,该标准使用1位符号,8位偏指数和23位尾数。浮点类型变量X的十进制值为-14.25。 X的十六进制表示形式为
(A) C1640000H
(B) 416C0000H
(C) 41640000H
(D) C16C0000H答案: (A)
解释:
Since No is negative S bit will be 1
Convert 14.25 into binary 1110.01
Normalize it : 1.11001 X 2 ^ 3
Biased Exponent (Add 127) : 3 + 127 = 130 (In binary 10000010)
Mantissa : 110010.....0 (Total 23 bits)
Num represented in IEEE 754 single precision format :
1 10000010 11001000000000000000000
In Hex (Group of Four bits) -
1100 0001 0110 0100 0000 0000 0000 0000
Num becomes : C1640000
这个问题的测验