An Algorithm for Converting BasesDate: 2/2/96 at 16:19:14 From: Paul Frieden Subject: base conversion I would like a formula for base conversions. My math teacher said that he had one, but now he can't find it. Thank you. Paul Frieden Date: 2/6/96 at 14:52:18 From: Doctor Ethan Subject: Re: base conversion Hello Paul, Here it is, butI wouldn't call it a formula. It is more like an algorithm. That means it is a method that always works, kind of like long division. Here we go. Let's say you have a number 10121 in base 3 and you want to know what it is in base 10. Well, in base three the place values are 1,3,9,27,81 so we have 1 *81 + 0 * 27 + 1 * 9 + 2* 3 + 1* 1 81 +0+ 9 +6 +1 = 97 that is how it works. You just take the number, figure out the place values, and then add them together to get the answer. Now, let's do one the other way. 45 in base ten (that is the normal one.) Let's convert it to base five. Well, in base five the place values will be 1,5,25,125 We won't have any 125's but we will have one 25. Then we will have 20 left. That is four 5's, so in base five our number will be 140. Hope that makes sense. If you don't see a formula, try to work out a bunch more examples and they should get easier. -Doctor Ethan, The Math Forum |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/