(d means decimal, b means binary)
- 12.25d is your float.
- You write 12d in binary and remove it from your float. Only the
remainder (.25d) will be left.
- You write the dot.
- While the remainder (0.25d) is not zero (and/or you want more digits), multiply it with 2 (->
0.50d), remove and write the digit left of the dot (0), and continue with the new remainder (.50d).