(30.25)base 10 to base 2?

Answers (1)

Subtract the largest power of 2 that does not exceed the input number.

32.5 - 32 = 0.25 so the left most bit of your answer is 1.

Subtract the next smaller power of 2. The next four subtractions each add a zero to your answer. So far the answer has 5 bits: 10000

Place a decimal point and continue subtracting: 10000.01

The .01 indicates no "point 1/2" and there is a "point zero 1/4".

This is almost never done in real life. They switch to floating point instead.

Votes: +0 / -0