| New Reply |
Converting between bases without base 10 mid-step |
Share Thread | Thread Tools |
| Jan26-12, 05:29 PM | #1 |
|
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.
|
| Jan26-12, 06:02 PM | #2 |
|
|
hi smize!
![]() i'm not sure what you're trying to do ![]() there's a general rule that logab = logxb/logxa … does that help? |
| Jan26-12, 06:08 PM | #3 |
|
Blog Entries: 1
|
|
| Jan26-12, 06:24 PM | #4 |
|
|
Converting between bases without base 10 mid-stepLet [itex]a[/itex] be your number and let p be the base you want to convert it. Use the division algorithm to write [tex]a=b_1p+r_1[/tex] Use it again on [itex]b_1[/itex]: [tex]b_1=b_1p+r_2[/tex] Keep doing it until a [itex]b_n=0[/itex]. Then we have [tex]b_{n-1}=0b_n+r_n[/tex] Then [itex]r_n...r_2r_1[/itex] is the number you want. |
| Jan26-12, 06:32 PM | #5 |
|
Blog Entries: 1
|
|
| Jan26-12, 06:52 PM | #6 |
|
|
|
| Jan26-12, 06:57 PM | #7 |
|
Blog Entries: 1
|
Could you give an example of using that to convert between let's say, base 6 and base 4?
|
| Jan26-12, 07:16 PM | #8 |
|
|
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. |
| Jan26-12, 07:21 PM | #9 |
|
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?
|
| Jan26-12, 07:22 PM | #10 |
|
|
Maybe there are other methods, but I doubt it... |
| Jan26-12, 07:27 PM | #11 |
|
Blog Entries: 1
|
|
| Feb4-12, 10:04 PM | #12 |
|
|
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 |
| New Reply |
| Thread Tools | |
Similar Threads for: Converting between bases without base 10 mid-step
|
||||
| Thread | Forum | Replies | ||
| MIPS Help (converting numbers to diff bases) | Programming & Comp Sci | 5 | ||
| Converting base 10 to Roman Numerals | Introductory Physics Homework | 3 | ||
| Converting between base 7 to 3 | Calculus & Beyond Homework | 9 | ||
| Converting rational number to a new base. | Linear & Abstract Algebra | 6 | ||
| Number theory, converting numbers too different bases | Calculus & Beyond Homework | 1 | ||