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
#0, Converting Bases to and Fro
Posted by woj5 on Jul-21-04 at 01:41 PM
Hello

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.

Woj from Florida


#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.


#2, RE: Converting Bases to and Fro
Posted by woj on Jul-21-04 at 09:53 PM
In response to message #1
Alex

your information was prompt and helpful. I understand how to go back and forth from base 10 to another base or another base back to base 10. I did not fully understand going from non base 10 to non base 10. The link you provided I had seen before but it was much more suited for a programmer. Anyway I will keep on working on it, I really appreciate your input.

woj


#3, RE: Converting Bases to and Fro
Posted by alexb on Jul-23-04 at 00:24 AM
In response to message #2
>your information was prompt and helpful. I understand how to
>go back and forth from base 10 to another base or another
>base back to base 10. I did not fully understand going from
>non base 10 to non base 10.

This can't be. The algorithm is exactly the same. The real problem here is that none of us humans is accustomed but to the decimal system. Conversion of integers between bases involves a lot of division, and this is where the problem lies.

If base conversion is your goal the best thing to do is practice division in various bases.


#4, RE: Converting Bases to and Fro
Posted by alfredo on Aug-23-05 at 03:24 PM
In response to message #3
Dear Alexi,

If you're interested, I modified http://www.cut-the-knot.org/binary.shtml to also calculate & display base 36 (we use it here for 1-byte addresses allowing up to 35 devices on a proprietary comms bus).

The attached file is only the 'form' from your page, but you may cut-and-paste it for your own purposes.

Regards,
Alf Lacis
Ai Scientific Pty Ltd
10-22 Hornibrook Esplanade
CLONTARF QLD 4019
AUSTRALIA
Ph: (+617 or 07) 3105 5087
http://www.aiscientific.com/


#6, RE: Converting Bases to and Fro
Posted by alexb on Aug-29-05 at 05:48 PM
In response to message #4
Dear Alf:

Thanks for letting me know. I was unaware of base 36 applications. I have modified the page to accommodate one more base.

All the best,
Alex


#5, RE: Converting Bases to and Fro
Posted by TheSmith on Aug-29-05 at 03:30 PM
In response to message #0
When I would teach this to my preservice teachers, I would get out the Unifix cubes and make them build the models for the numbers. (You might be able to find base-n blocks for some smaller values of n, but maybe not and they might be expensive.) If the number was 221 (base 3) = ___ (base 5), then they would use the cubes to make 2 3x3 squares, 2 3x1 rods and 1 extra piece. Then they could take them apart and try to make as many 5x5 squares as possible, then 5x1 rods and then count the left over pieces.

The nice thing about this is that the reinforces the notion of place value and from this, many students begin to develop their own informal (and eventually formal) notions and algorithms for non-decimal bases. For example, if they have more than 5 of something, they should be able to see how it would form the next largest piece and why the available numerals have changed. (It also lends itself very naturally to the same processes with multiplication and division, but that's more than you are asking.)

If you are interested in more details, I can email you some stuff about this, including specifics on some of the models and some of the problems that I've used in the past. I know that a nice, quick and snappy algorithm for just plugging and chugging might be what you are looking for, but I found that when we did that and they didn't have any understanding, mistakes were everywhere. Let me know if you are interested in any more of this at smit3397umn.edu.