简体   繁体   English

将 IEEE 单精度转换为十进制

[英]Converting IEEE single precision to decimal

If S = 0, E = 01110011, and F = 100101如果 S = 0,E = 01110011,并且 F = 100101

E would be 115 right? E应该是115吧? and if so would that make the exponent -12?如果是这样,那会使指数为-12吗?

If the Bias is 127.如果偏差为 127。

Here's how your number parses as a 32-bit SP IEEE-754 float:以下是您的号码如何解析为 32 位 SP IEEE-754 浮点数:

                  3  2          1         0
                  1 09876543 21098765432109876543210
                  S ---E8--- ----------F23----------
          Binary: 0 01110011 10010100000000000000000
             Hex: 39CA 0000
       Precision: SP
            Sign: Positive
        Exponent: -12 (Stored: 115, Bias: 127)
       Hex-float: +0x1.94p-12
           Value: +3.8528442e-4 (NORMAL)

The stored exponent is 115 , which coresponds to -12 with a bias of 127 .存储的指数是115 ,对应于-12 ,偏差为127

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM