Converting base 10 numbers to base 2

Converting integers to base 2 is reasonably easy.

For example, what is 82 in base 2?

Think about powers of 2

n2^n
01 (‘ones’)
12 (‘tens’)
24 (‘hundreds)
38 (‘thousands’)

Make 82 the sum of powers of 2.

82=64+16+2=1\times 2^6+0\times 2^5+ 1\times 2^4+0\times 2^3+0\times 2^2+1 \times 2^1+0\times 2^0=1010010

We follow the same approach for real numbers

n2^n
-3\frac{1}{8}=0.125
-2\frac{1}{4}=0.25
-1\frac{1}{2}=0.5
01 (‘ones’)
12 (‘tens’)
24 (‘hundreds)
38 (‘thousands’)

Convert 0.765625 to base 2

0.765625\times 2=1.53125 the first number is 1

0.53125\times 2=1.0625 the second number is 1

0.0625\times 2=0.125 the third number is 0

0.125\times 2=0.25 the fourth number is 0

0.25\times 2=0.5 the fifth number is 0

0.5\times 2=1 the sixth number is 1 and we have finished

0.765625=0.110001_2

What about something like 2.\overline{4}?

The non-decimal part 2=10

0.\overline{4}\times 2=0.\overline{8} first number is zero

0\overline{8}\times 2=1.\overline{7} second number is 1

0.\overline{7}\times 2=1.\overline{5} third number is 1

0.\overline{5}\times 2=1.\overline{1} fourth number is 1

0.\overline{1}\times 2=0.\overline{2} fifth number is 0

0.\overline{2}\times 2=0.\overline{4} sixth number is 0

We are back to where we started, so 2.\overline{4}=10.0111000111000..._2=10.\overline{0.11100}_2

Leave a Comment

Filed under Arithmetic, Decimals, Fractions, Number Bases

Leave a Reply

Your email address will not be published. Required fields are marked *