9位浮点重新$ P $使用IEEE浮点格式A和B psentations [英] 9-bit floating point representations using IEEE floating point format A and B

查看:444
本文介绍了9位浮点重新$ P $使用IEEE浮点格式A和B psentations的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些麻烦,我碰到的处理浮点问题。我有一个很难从浮点再presentation移动到十进制值,也可以从重新presentation的格式的格式化重新presentation乙。

I'm having some trouble with a problem I've run into dealing with floating points. I'm having a hard time moving from floating point representation to decimal values and also from format A of the representation to format B of the representation.

问题:

考虑以下两个9位浮点再presentations基于IEEE浮点格式。

Consider the following two 9-bit floating-point representations based on the IEEE floating-point format.


  • 格式A

有一个符号位。
有K = 5指数比特。该指数的偏差15。
有n = 3小数位。

There is one sign bit. There are k = 5 exponent bits. The exponent bias is 15. There are n = 3 fraction bits.


  • 格式B

有一个符号位
有K = 4指数比特。该指数的偏见是7。
有n = 4派位

There is one sign bit There are k = 4 exponent bits. The exponent bias is 7. There are n = 4 faction bits

问题要我从一个格式转换的浮点再presentation0 10110 011为格式B.它也想知道每种格式的值。任何人都可以帮助我为这些任务的过程。或者直接给我一个内容丰富的网站,将能够给我看。我一直在寻找,现在有一阵子,我无法找到任何资源。谢谢!

The problem wants me to convert the floating point representation "0 10110 011" from Format A to Format B. It also wants to know the values for each format. Can anyone assist me with the procedure for both of these tasks. Or perhaps direct me to an informative website that would be able to show me. I've been searching for a while now and I'm having trouble finding any resources. Thanks!

-Matt

推荐答案

010110011在1-5-3格式为标志0,偏置指数10110 2 ,和连接codeD尾数011该标志是+,无偏指数是22-15 = 7,尾数为1.011 2 = 1.375。 (我们prefixed的EN codeD尾数为1),以便重新presented数量+2 7 •1.375 = 176。

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.

要带code 176在1-4-4格式,走的事实,即你已经知道它是+2 7 •1.375。因此,符号为+,无偏指数为7,尾数为1.011 2 。这个尾数适合在四位(需要所以没有四舍五入);带连接codeD尾数(除去最主要的1)是0110的偏指数为7,偏压为7,所以偏置指数为14 = 1110 2 。因此,位域符号0,指数1110,尾数0110,和所有的9位是011100110。

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.

这篇关于9位浮点重新$ P $使用IEEE浮点格式A和B psentations的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆