Blog Entries: 1

## Converting between bases without base 10 mid-step

I am currently trying to go between any two bases which are between and including base 2 to base 10. (i.e, base 10 to base 3, base 4 to base 6, etc...). Is there an equation or set of formulas for a one-step transition between the bases (or one-way method, rather than converting to base-10 then to base-x.
 PhysOrg.com science news on PhysOrg.com >> King Richard III found in 'untidy lozenge-shaped grave'>> Google Drive sports new view and scan enhancements>> Researcher admits mistakes in stem cell study
 Blog Entries: 27 Recognitions: Gold Member Homework Help Science Advisor hi smize! i'm not sure what you're trying to do there's a general rule that logab = logxb/logxa … does that help?

Blog Entries: 1
 Quote by tiny-tim there's a general rule that logab = logxb/logxa
Yes; I know the general log rules. I am part of the Math Academic team at my school and we are having to convert, for example, 20123 to Base 6. The issue at hand is we, at most, have 45 seconds to do the calculations and guarantee they are correct. We are wondering if there is a way to do this without have to convert it to Base 10 first. A.K.A. is there a direct way to convert between two non-decimal number systems?

Blog Entries: 8
Recognitions:
Gold Member
Staff Emeritus

## Converting between bases without base 10 mid-step

 Quote by smize Yes; I know the general log rules. I am part of the Math Academic team at my school and we are having to convert, for example, 20123 to Base 6. The issue at hand is we, at most, have 45 seconds to do the calculations and guarantee they are correct. We are wondering if there is a way to do this without have to convert it to Base 10 first. A.K.A. is there a direct way to convert between two non-decimal number systems?
Yes, there is a way to do this, but all depends on how fast you can calculate.

Let $a$ be your number and let p be the base you want to convert it. Use the division algorithm to write

$$a=b_1p+r_1$$

Use it again on $b_1$:

$$b_1=b_1p+r_2$$

Keep doing it until a $b_n=0$. Then we have

$$b_{n-1}=0b_n+r_n$$

Then $r_n...r_2r_1$ is the number you want.

Blog Entries: 1
 Quote by micromass Let $a$ be your number and let p be the base you want to convert it. Use the division algorithm to write
you didn't define the division algorithm...And using this, a will have to equal a non base-10 number to another non base-10 number of a different number system.
 Blog Entries: 8 Recognitions: Gold Member Science Advisor Staff Emeritus
 Blog Entries: 1 Could you give an example of using that to convert between let's say, base 6 and base 4?
 Blog Entries: 8 Recognitions: Gold Member Science Advisor Staff Emeritus Let's pick 2201 base 4 and let's convert it base 6. So a=2201 and p=12 (remember to express p also in base 4). 2201= 12*103 + 11 122= 12*10 +2 10 = 12*0 +10 Thus 2201 in base 6 is 10 2 11. If we put 10=4 and 11=5, then we get 425.
 Blog Entries: 1 So the division algorithm does work for all bases, it is just a matter of familiarizing yourself with the multiplication tables of the other bases, correct?

Blog Entries: 8
Recognitions:
Gold Member
Staff Emeritus
 Quote by smize So the division algorithm does work for all bases, it is just a matter of familiarizing yourself with the multiplication tables of the other bases, correct?
Correct. And that might be a bit difficult.

Maybe there are other methods, but I doubt it...

Blog Entries: 1
 Quote by micromass Correct. And that might be a bit difficult. Maybe there are other methods, but I doubt it...
it is either that or converting to base 10 then the other bases. In some cases the multiple choice answers we have to choose from are also of 2 different bases -.- And we'll only have 45 seconds to answer.
 Recognitions: Gold Member converting from power of 2 you just regroup the bits. base 2, 4, and 8 is easy same for base 3 and 9. 67 base 8 to base 2 110 111 then to base 4 11 01 11 or 313 for base 9 to base 3, 87 base 9 is 22 21 base 3 The others are a bit tougher
 Blog Entries: 1 Thank you coolul007. It is a very interesting method.