Conversion Doubt Number System

Thread Starter

intuitivegrad30

Joined Apr 2, 2013
4
Here's a small doubt...

We know that...

A number in any base can be converted to base 10 by multiplying the digits of the number to (base powered with respect to the position).

Ex: (110) in base 2 = 2^2*1+2^1*1+2^0*0=6 in base 10


So, the doubt is whenever we try to convert a number in any system using the above procedure, why does the result get converted finally into base 10?? why not base n???
 

WBahn

Joined Mar 31, 2012
30,077
Because you are doing the math in base 10.

If you wanted to convert it to base 3, then just do the math in base 3.

110 (base_2) =
2^2*1 = 11*1 = 11
2^1*1 = 02*2 = 02
2^0*0 = 01*0 = 00

11 + 02 + 00 = 20 (base 3)
 

Thread Starter

intuitivegrad30

Joined Apr 2, 2013
4
why did you assume that i am doing the math in base 10??

110 base 2 = 6 for all bases starting from 7

110 base 2 = 20 base 3, 12 base 4, 11 base 5, 10 base 6


So, is it a traditional convenient assumption that the converted value is in base 10?? why not base 7,8,9...........
 

WBahn

Joined Mar 31, 2012
30,077
why did you assume that i am doing the math in base 10??
You want to play that game, fine. Why did you assume that your result was in base 10??

110 base 2 = 6 for all bases starting from 7

110 base 2 = 20 base 3, 12 base 4, 11 base 5, 10 base 6


So, is it a traditional convenient assumption that the converted value is in base 10?? why not base 7,8,9...........
As I indicated, the base of the result is whatever number base you do the math in.

If you have a single digit result, then that result is indistinguishable from the corresponding result in any number base that is greater than the value of the single digit -- there, does that float your boat?
 

Thread Starter

intuitivegrad30

Joined Apr 2, 2013
4
Nah, I actually didn't assume anything about base 10... i was totally confused by buks, that whether i've missed any concept that would explain why everything gets converted to base 10. So, lol i guess i assumed that people were assuming that everything gets converted into base 10...and i was wrong :)...

Actually i was confused by this...

\({(N)_{10} =a_{n-1}b^{n-1}+a_{n-2}b^{n-2}+...a_0b^0+a_{-1}b^{-1}...+a_{-m}b^{-m}}\)

where n is the number of integral digits and m the number of fractional digits. The base of the system is b and a is a digit in the number system whose base is b.

:D..

Yes, i too thought the same that the number converted is indistinguishable in all bases greater than that number itself :)...

Thanks again, for clearing my ambiguity.
 

WBahn

Joined Mar 31, 2012
30,077
Actually i was confused by this...

\({(N)_{10} =a_{n-1}b^{n-1}+a_{n-2}b^{n-2}+...a_0b^0+a_{-1}b^{-1}...+a_{-m}b^{-m}}\)

where n is the number of integral digits and m the number of fractional digits. The base of the system is b and a is a digit in the number system whose base is b.
This can be generalized to:

\({(N)_{B} =a_{n-1}b^{n-1}+a_{n-2}b^{n-2}+...a_0b^0+a_{-1}b^{-1}...+a_{-m}b^{-m}}\)

With the caveat that the math on the right simply has to be performed in base B.

There are two efficient way to perform number base conversions. One is by repeated multiplication by the number base being converted FROM while doing the math in the number base being converted TO. The other is by repeated division by the number base being converted TO while doing the math in the number base being converted FROM. Since we (as a general rule) are most adept at base 10 math, we chose the former when convering a number to base 10 and choose the latter when convering a number from base 10. If you are converting between two bases neither of which is base 10, then one option is to convert to base 10 as an intermediate step.
 

Thread Starter

intuitivegrad30

Joined Apr 2, 2013
4
So, the second case in conversions between number system, i.e. where we have to do the division using base we are converting to and doing the math(i.e. division math (or) combination of multiplication and then subtraction in-order to obtain the remainders) and then piling them up from the last one.

so converting 110 base 2 to base 3 is what you showed using case 1 previously

"110 (base_2) =
2^2*1 = 11*1 = 11
2^1*1 = 02*2 = 02
2^0*0 = 01*0 = 00

11 + 02 + 00 = 20 (base 3)" i.e. doing the math in base 3(TO)

or otherwise using intermediary base 10.. and then case 2 using base 3...

So, how do you convert 6 base 10 to base 2 i.e 110 using case 1??

I assume we can do this way 6=10^0*6=(10^0)*(2*3)=(1 base 2)*(10*11) and get the result right?

or any other generalized where i dont have to find factors and then converting them manually(i.e. converting 2 and converting 3 as above)...?
 
Last edited:

WBahn

Joined Mar 31, 2012
30,077
So, the second case in conversions between number system, i.e. where we have to do the division using base we are converting to and doing the math(i.e. division math (or) combination of multiplication and then subtraction in-order to obtain the remainders) and then piling them up from the last one.

so converting 110 base 2 to base 3 is what you showed using case 1 previously

"110 (base_2) =
2^2*1 = 11*1 = 11
2^1*1 = 02*1 = 02 (EDIT: Fixed the typo caught by djsfantasi)
2^0*0 = 01*0 = 00

11 + 02 + 00 = 20 (base 3)" i.e. doing the math in base 3(TO)

or otherwise using intermediary base 10.. and then case 2 using base 3...

So, how do you convert 6 base 10 to base 2 i.e 110 using case 1??

I assume we can do this way 6=10^0*6=(10^0)*(2*3)=(1 base 2)*(10*11) and get the result right?

You do the math on the right hand side in the base you are converting to.

That means ALL the math on the right hand side is in base 2.

6 (base 10) = (1010^0)*(110) = 1*110 = 0

This is no different than when we convert from hex to base ten:

BF (base 16) = (16^1)*(11) + (16^0)*(15) = 16*11 + 15 = 191

On the right hand side we don't have "B" and "F" since they don't represent values less than the number base we are doing the math in. So we convert them to multidigit values with the new base. That's all I did with the '6' in the prior example. Similarly, the number base being converted from needs to be written in the number base being converted to. So '10' -> '1010' in the first case.

Working with single digit values isn't very constructive because you don't see the issues and techniques fully come into play unless you are dealing with multiidigit values.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
Because you are doing the math in base 10.

If you wanted to convert it to base 3, then just do the math in base 3.

110 (base_2) =
2^2*1 = 11*1 = 11
2^1*1 = 02*2 = 02
2^0*0 = 01*0 = 00

11 + 02 + 00 = 20 (base 3)

I disagree with your second line :eek:; I think there's a subtle typo...
\(2^1*1\ =\ 02_3*\LARGE1\normalsize\ =\ 02 \)
In your example, \(02_3 * \LARGE2\) is only equal to \(02_3\) for very small values of \(\LARGE2\)... [An old math joke :D]
 
Top