Converting from One Base to AnotherDate: 10/28/96 at 22:55:38 From: Robert A. Geise Subject: Radixes Dr. Math; I need assistance understanding how to convert a radix equation. My homework problem is as follows: 9 18075 4 9 = the base we start in. 18075 = the number we are converting. 4 = the base we are converting to. I want to be able to follow a formula to convert numbers. My teacher gave us this example of converting 18075, in base 9, to a number in base 10 (x is the result of the conversion): x = 1*9^4 + 8*9^3 + 0*9^2 + 7*9^1 + 5*9^0 To convert a number to base 10, the teacher gave the example: 5 | 47 ------ 9 remainder 2 ------ 1 remainder 4 So 142 base 5 = 47 base 10? I really need your help in understanding this concept. If you would be so kind as to explain, in simple terms, how to solve these equations, I would greatly appreciate it. Maybe a few examples? If I can see a correct answer, I will continue to practice until I can do conversions in my sleep! Here are the numbers given for homework: 9 18075 4 2 11001 5 8 13071 16 5 01996 8 Thank you for your help, time and consideration. Date: 11/11/96 at 14:00:51 From: Doctor Donald Subject: Re: Radixes You do have the routine stated correctly. First of all, to convert a number in any given base to its base 10 form, you use the powers as you showed. For instance 142 base 5 MEANS: 1*5^2 + 4*5^1 + 2*5^0 = 1*25 + 4*5 + 2*1 = 25 + 20 + 2 = 47 which is what it is supposed to be. Converting 18075 base 9 to base 10 is the same kind of process, only with more arithmetic. You start out with 1*9^4 + 8*9^3, etc. Actually it is easier to do it in the other order, starting 5*9^0 + 7*9^1 + 0*9*^2 etc. Anyhow, you can get your value for x, as the teacher called it, by this process. You should get 12461 as the base 10 version. To convert FROM base 10, you use the division and remainder system you showed. Perhaps the teacher showed you why this works. In any case, it does work. To convert 12461 to base 4, you just start dividing by 4: 4|12461 3115 r 1 778 r 3 194 r 2 48 r 2 12 r 0 3 r 0 0 r 3 This means that the remainders READ BACKWARDS give the base 4 representation of the number. That is, 3002231 base 4 represents 12461 base 10. You can check this by evaluating 1*4^0 + 3*4^1 + 2*4^2 + 2^4^3 + 3*4^6, which does work out to 12461, as it should. Be careful with your division, and check your answers by converting back to base 10. -Doctor Donald, The Math Forum Check out our web site! http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2015 The Math Forum
http://mathforum.org/dr.math/