Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: Middle school
Topic ID: 99
Message ID: 1
#1, RE: Converting Bases to and Fro
Posted by alexb on Jul-21-04 at 03:14 PM
In response to message #0
>I am a middle school math teacher and on occassion some of
>the Math competitions I help run questions on converting
>from base ten to base two or vice versa....and on occasion
>for example base 3 to base 5. I understand the techniques
>are antiquated however I am looking for the algorithm that
>show some of these techniques. There still are kids out
>there interested. Can anyone help.

The basic conversion algorithm as described at

http://www.cut-the-knot.org/recurrence/conversion.shtml

works between any two different bases, but depending on the comfort level of your students in working with various bases, it could be easier to make a double conversion, say, from 3 to 10 and then from 10 to 5. Special cases, like conversion between bases 2, 4, 8, 16 are well known. Similarly could be treated conversion between bases 3 and 9.

For small numbers, a direct approach could be as palatable. For example what is base 5 number 1243, which I write as 12435, in base 3?

12435 = 3 + 4·5 + 2·52 + 1·53 = 103 + 113·123 + 2·2213 + 1·111223 = 103 + 2023 + 12123 + 111223 = 211003.

Let's check this in base 10:

211003 = 2·34 + 33 + 32 = 162 + 27 + 9 = 19810.

On the other hand, converting to base 10 from base 5:

12435 = 53 + 2·52 + 4·5 + 3 = 125 + 50 + 20 + 3 = 198.