How to convert or cast a float into its bit sequence such as a long

前端 未结 5 762
死守一世寂寞
死守一世寂寞 2021-01-13 02:24

Good day, I am working in a 16-bit C environment, and I want to convert a float value into its bit sequence such as an integer value. There are multiple ways I know how to a

5条回答
  •  清歌不尽
    2021-01-13 03:06

    You should know somethings about IEEE floating point standards. http://en.wikipedia.org/wiki/IEEE_floating-point_standard

    get the fractions bits and get the exponent bits and process them into a long

提交回复
热议问题