Hi guys.

i'm new here.

English isn't my first language, so you'd have to forgive me for any mistakes you might find...

I couldn't find more suitable place to post it, and i hope this is the right forum for my question...

So, i want to be able to convert numbers from one base to another.

i know how to do it from any given (decimal) number, to any other base.

Say i want to convert the number 347:

$\displaystyle 347/6=57, R=5$

$\displaystyle 56/6=9, R=3$

$\displaystyle 9/6=1, R=3$

$\displaystyle 1/6=0, R=1$

So $\displaystyle 347_{10}=1335_{6}$ (the remainders).

and the other direction:

$\displaystyle 1335_{6}=5\cdot6^0+3\cdot6^1+3\cdot6^2+1\cdot6^3=3 47_{10}$

(the reason i'm showing the calculation here is because i would love to hear about a better, faster way to convert numbers from base to base)

my problem is:

i want to be able to convert numbers from base to base directly.

for example: if i want to convert $\displaystyle 1335_{6}$ to an octal, eight based number, i first need to convert to $\displaystyle 347_{10}$, and only then i'm able to convert to an octal number.

is there a way to skip the decimal conversion part and go straight to the octal number?

if so, how can it be done?

thanks in advanced, and have a nice day!