Assuming you are not thinking about a PC, just thinking about binary vs decimal, as physically represented on a piece of paper:
You know that .1 in binary must be .5 in decimal, so a .1 value is .5 (1/2)
.01 costs .25 (1/4) (half the previous)
.001 worth (1/8) (half 1/4)
Notice how the denominator progresses in the same way as all numbers to the left of the decimal standard pattern ^ 2? The next one should be 1/16 ...
So you start with your .625, is it higher than .5? Yes, so set the first bit and subtract .5
.1 binary with decimal remainder .125
Now you have the next place, it costs 0.25 deck, is it less than your current balance .125? No, so you don’t have enough decimal “Money” to buy second place, it should be 0
.10 binary, still .125 remainder.
Now go to the third position, etc. (Hint: I don’t think there will be too much, etc.)
source share