9-bit floating point representations using IEEE floating point format A and B

社会主义新天地 提交于 2019-12-02 06:41:07

010110011 in the 1-5-3 format is sign 0, biased exponent 101102, and encoded significand 011. The sign is +, the unbiased exponent is 22–15 = 7, and the significand is 1.0112 = 1.375. (We prefixed the encoded significand with “1.”) So the number represented is +27•1.375 = 176.

To encode 176 in the 1-4-4 format, take advantage of the fact that you already know it is +27•1.375. Thus, the sign is +, the unbiased exponent is 7, and the significand is 1.0112. This significand fits in four bits (so no rounding is needed); the encoded significand (removing the leading “1.”) is 0110. The unbiased exponent is 7, the bias is 7, so the biased exponent is 14 = 11102. So the bit fields are sign 0, exponent 1110, significand 0110, and all nine bits are 011100110.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!