# Conversion of bases

• Aug 25th 2010, 01:45 AM
mark090480
Conversion of bases
So in base 10 we can represent 200 in base two as follows.

200/2 = 100 R 0
100/2 = 50 R 0
50/2 = 25 R0
25/2 = 12 R1
12/2 = 6 R0
6/2 = 3 R0
3/2 = 1 R1
1/2 = 0 R1

So 200 in base 2 = 11001000.

I understand how that works. But to get back we do this.

Base 10 digits 0 1 2 3 4 5 6 7
Base 2 digits 0 0 0 1 0 0 1 1

where there are ones 2^3 + 2^6 + 2^7 = 200. Could someone explain how that works?

Thanks.
• Aug 25th 2010, 04:59 AM
tonio
Quote:

Originally Posted by mark090480
So in base 10 we can represent 200 in base two as follows.

200/2 = 100 R 0
100/2 = 50 R 0
50/2 = 25 R0
25/2 = 12 R1
12/2 = 6 R0
6/2 = 3 R0
3/2 = 1 R1
1/2 = 0 R1

So 200 in base 2 = 11001000.

I understand how that works. But to get back we do this.

Base 10 digits 0 1 2 3 4 5 6 7
Base 2 digits 0 0 0 1 0 0 1 1

where there are ones 2^3 + 2^6 + 2^7 = 200. Could someone explain how that works?

Thanks.

That is precisely the meaning of "writing in basis x": you express numbers as a sum of powers of x multiplied by integers between 0 and x.

For example, $\displaystyle 306= 3\cdot 10^2+0\cdot 10^1+6\cdot 10^0=3\cdot 10^2+6$

That is why, thus, in base 2 you have to sum up the powers of 2 corresponding to the 1's in the expression of the number in binary.

Tonio
• Aug 25th 2010, 08:35 PM
mark090480
But why does doing the power of 2^x, where x is a remainder give the exact value?
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}