This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

浮点数问题

CCS中浮点数存储方式是什么样的,比如3.0,在内存中存储的十六进制为多少?

  • 在CCS环境中,float型数据为32位,三部分存储顺序及位数为:阶码(8位)+符号位(1位)+尾数(23位)。其中阶码使用补码形式表示。尾数存储顺序从左到右存储,不足23位,补充完23位,足够23位的,只存储前23位。以10.0f举例,其在CCS中存储为0x03200000,二进制为0000 0011 0010 0000 0000 0000 0000 0000