Hi
I'm learning to convert decimal fractions into their binary equivalent.
1: After the decimal point 2's powers are in negative: 2^-1, 2^-2, 2^-3, ...; and this is equivalent to: 0.5, 0.25, 0.125, ....
Let's say we want to convert 0.625 into its a binary fraction.
If we subtract "0.5" or "2^-1" from 0.625 we are left with 0.125 and "0.125" can be represented by 2^-3.
Therefore,
0.625 = 0.5 + 0 + 0.125 = 0.101
The above example was found in a book. Suppose, we have 0.620 instead. How would we convert it into a binary fraction using the method we used above? How do I use this method so that I can deal with any given decimal number?
2: I know there is another method of repeated multiplication by 2. Though this method seems simple but it's not that much natural. Please have a look on the linked scan (or, you can check the attachment):
https://img809.imageshack.us/img809/4655/imgus.jpg
I have tried to apply repeated multiplication method to convert a decimal fraction to a binary one. In case of 0.3125 I was successful but then I tried to apply it on 0.620 without any success. It seems the method would never end.
Please help me.
Regards
PG