0

16.75 convert to base 2 floating point representation.

Need help on formula, Thanks.

  • 1
    Have you found a formula online? Go dig one up and show us what you tried. Then we'll help guide you from there – Sidharth Ghoshal Apr 14 '16 at 08:11
  • Hi and welcome to the site. If it looks like a homework question sometimes people on here can be reluctant to help unless you show what you've done to try solve the problem. – mathreadler Apr 14 '16 at 08:14

2 Answers2

1

Note $16.75=2^4+2^{-1}+2^{-2}$ so in base $2$ we have $10000.11=1000011\cdot2^{-2}$

pancini
  • 19,216
0

$16=2^4$ and $0.75=3/4=3\times 2^{-2}$. Therefore $16.75_{10}=10000.11_2.\;$ Or do you want to have IEEE floating point format (for single, double)?

The IEEE double is computed as: sign bit $= 0,\;$ exponent $4+1023,\;$ significand including high bit =$100001100000000\dots$. Omitting the leading significand bit and combining the parts give

0 10000000011 0000110000000000000000000000000000000000000000000000

written in 4-bit blocks

0100 0000 0011 0000 1100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

or as hexadecimal

4030C00000000000
gammatester
  • 18,827
  • Hi yes, IEEE floating point format for double too, thanks! – firstimer08302 Apr 14 '16 at 08:25
  • why do you omit the leading significand bit? is that what happens in IEEE notation for double? If so how do they no if it is zero or one for the leading significand bit? – Thalatta Oct 21 '17 at 20:04
  • @Thalatta:The bit is never stored. If the number is subnormal there is no implicit leading bit, see https://en.wikipedia.org/wiki/Floating-point_arithmetic#Internal_representation – gammatester Oct 21 '17 at 21:10