Moving from one numeral system to another...

Hi.

Hope it's the right place to post it (if not - please move it to the right forum).

I have a question regarding the transfer between numeral systems.

the way to convert, for example, the binary number to decimal will be:

and, if I want to go back to a binary number:

,

,

,

,

,

,

,

,

,

concatenating all the remainders togather, we'll get:

now, I do understand the logic behind this operations, but one thing is bothering me:

let's say I want to convert the same binary number to a 5-based (or even a 6 or a 7-based) number.

the only way to do it is to first convert to with the same method above, and only then to convert to (using the second method, with the remainders).

Why isn't there a way to directly convert to ?

What is stoping me from doing that?

Hope the the question is clear enough.

thanks in advanced.

Re: Moving from one numeral system to another...

Quote:

Originally Posted by

**Stormey** Hi.

Hope it's the right place to post it (if not - please move it to the right forum).

I have a question regarding the transfer between numeral systems.

the way to convert, for example, the binary number

to decimal will be:

and, if I want to go back to a binary number:

,

,

,

,

,

,

,

,

,

concatenating all the remainders togather, we'll get:

now, I do understand the logic behind this operations, but one thing is bothering me:

let's say I want to convert the same binary number to a 5-based (or even a 6 or a 7-based) number.

the only way to do it is to first convert

to

with the same method above, and only then to convert

to

(using the second method, with the remainders).

Why isn't there a way to directly convert

to

?

What is stoping me from doing that?

Hope the the question is clear enough.

thanks in advanced.

It is because you are used to dealing with base-10 numbers. You don't even realize that you are actually going through the same process when you convert to base-10 that you did to convert to base-2.

The expression is not in base-10. You then have to add everything up and put it in base-10. You find it easy to add things this way because you are used to base-10 operations. If you were used to adding numbers in other bases, you might just as easily dismiss the following addition: . This process is the exact same process you used for converting the binary number to base-10, but it might not look right because it is not in base-10. In base-10, the process we are taught for addition is to add up a column of digits, record the units place of the sum and "carry" the rest of the digits one column to the left. This is the same as taking the remainder when the sum is divided by 10.

So, you can certainly convert directly from one base to another, so long as you are comfortable with the arithmetic operations of that base.

Edit -- Here is an example of going from base-2 to base-7 without stopping at base-10:

Re: Moving from one numeral system to another...

Brilliant.

Just the answer I was looking for (it didn't occur to me that the **arithmetic** itself also needs to be converted to the new base...).

Thanks, SlipEternal.

Just one more thing:

Quote:

Originally Posted by

**SlipEternal** If you were used to adding numbers in other bases, you might just as easily dismiss the following addition:

.

Shouldn't it be ,

since the number inside the parentheses is the base to which we are converting?

Re: Moving from one numeral system to another...

Quote:

Originally Posted by

**Stormey** Shouldn't it be

,

since the number inside the parentheses is the base to which we are converting?

In base-5, the number is .

Edit: This might help visualize what is happening a little better:

Also, I updated my post above to include an example of converting directly from base-2 to base-7.

Re: Moving from one numeral system to another...