Suppose we have a 7-bit computer that uses IEEE floating-point arithmetic where a
floating point number has 1 sign bit, 3 exponent bits, and 3 fraction bits. All of the bits in
the hardware work properly.
Recall that denormalized numbers will have an exponent of 000, and the bias for a 3-bit
exponent is 3.要转换的数字为-0.125
这是我的尝试
转换为二进制格式
0.001移动小数
0001.0 所以E= -3,因为我们将小数右移了3次
E = e -bias
-3 = e -3那么e=0和M= 0?这给了我
1 000 000这是错误的。正确答案应该是1 000 100。
我做错了什么?
发布于 2014-02-18 15:46:16
偏差是3,因此1.0的指数被存储为3。因此,要得到1/8,您可能希望存储零,但这是一个非正规数字的表示。非正规数字必须显式地存储前导位,这样尾数就变成了100而不是000。需要存储该1会导致精度下降,这是反规范化的症状。
https://stackoverflow.com/questions/21847119
复制相似问题