In binary notation, what is the meaning of the digits after the radix point “.”?

后端 未结 7 557
感情败类
感情败类 2020-12-28 13:22

I have this example on how to convert from a base 10 number to IEEE 754 float representation

Number: 45.25 (base 10) = 101101.01 (base 2) Sign: 0
Normalized          


        
7条回答
  •  太阳男子
    2020-12-28 14:11

    Simple place value. In base 10, you have these places:

    ... 103 102 101 100 . 10-1 10-2 10-3 ...

    ... thousands, hundreds, tens, ones . tenths, hundredths, thousandths ...

    Similarly, in binary (base 2) you have:

    ... 23 22 21 20 . 2-1 2-2 2-3 ...

    ... eights, fours, twos, ones . halves, quarters, eighths ...

    So the second place after the . in binary is units of 2-2, well known to you as units of 1/4 (or alternately, 0.25).

提交回复
热议问题