Converting from Base 6 to 10 and BackDate: 09/26/2001 at 17:33:10 From: leah Subject: Converting base 6 to 10 and the reverse I need to know how to convert 2411 in base 6 to base 10. Date: 09/27/2001 at 12:18:56 From: Doctor Greenie Subject: Re: Converting base 6 to 10 and the reverse Hello, Leah - There are two basic methods for converting a number from base 6 (or any other base) to base 10; and there are two basic methods for converting a number the other way - from base 10 to another base. Converting in either direction, one of the two methods is rather slow and inefficient, but it is very good for helping to understand the process, because it helps teach place values in different number bases; in both cases the second method is much faster and more efficient. I will work an example in both directions using both methods. It is probably best to use the slower method when you are first learning how to convert numbers from one base to another; then, when you have done enough problems that you understand the process, you can use the faster method to save time. (I work with computers, and I frequently have to convert numbers from base 10 to base 16 or the other way around; since this is something I do often, I use the faster method to save time. But when I was first learning how to convert numbers from one base to another, I used the slower method.) Here is the problem I am going to work: Convert 1524 (base 6) to base 10; and then convert my result in base 10 back to base 6. I will first work the problem using the two slow methods; then I will work the same problem using the more efficient methods. SLOW METHODS In base 10, the place values are 1 10 10^2 = 10x10 = 100 10^3 = 10x10x10 = 1000 etc. In base 6, the place values are 1 6 6^2 = 6x6 = 36 6^3 = 6x6x6 = 216 etc. *** Base 6 to Base 10, Slow Method ---------------------------------- Let's start by considering the base 10 number 1524; let's analyze it using the place values for base 10: 1524 (base 10) = 1000 (base 10) = 1x1000 = 1000 (base 10) + 500 (base 10) = 5x 100 = 500 (base 10) + 20 (base 10) = 2x 10 = 20 (base 10) + 4 (base 10) = 4x 1 = 4 (base 10) --------------------------------------- = 1524 (base 10) To convert the number 1524 (base 6) to base 10, we need to use the place values for base 6: 1524 (base 6) = 1000 (base 6) = 1x216 = 216 (base 10) + 500 (base 6) = 5x 36 = 180 (base 10) + 20 (base 6) = 2x 6 = 12 (base 10) + 4 (base 6) = 4x 1 = 4 (base 10) --------------------------------------- = 412 (base 10) So the base 6 number 1524 is equivalent to the base 10 number 412. This completes the process of converting a number from base 10 to base 6 using the slow place-value method. Now let's convert the base 10 number we have obtained, 412, back to base 6, using the slow place-value method. We should, of course, come up with our original base number 1524 (base 6) as our result. ***Base 10 to Base 6, Slow Method --------------------------------- To convert 412 (base 10) to base 6, we again need to use the base-6 place values: 1, 6, 36, 216, .... The next place value in base 6 (after 216) is 6 times 216, which is bigger than the number we are trying to convert (412), so we don't need to use larger base-6 place values. In this slow place-value method of converting from base 10 to base 6, we use the largest base-6 place values first. So our first step is to find out how many 216s there are in the number we are converting, 412: 412/256 = 1 remainder ??? This tells us that the digit in the 216s place of our base-6 number is 1. In base 10, the value of 1 in the 216s place is 1x216 = 216. So our base 6 number is 1XXX, and with the 1 in the 216s place, the base-10 number we have left is 412 -216 ---- 196 The next base-6 place value is 36; we next need to find out (in base 10) how many 36s there are in 196: 196/36 = 5 remainder ??? So the base-6 digit in the 36s place is 5; 5 in the 36s place has the base-10 value 5x36 = 180. Our base 6 number is now 15XX; with these two base-6 digits in place, the base-10 number we have left is 196 -180 ---- 16 The next base-6 place value is 6; the base-10 number we have left, 16, is equal to two 6's with 4 left over, so the last two digits of our base-6 number are 24 and our final base-6 number is 1524 - which is (as it must be) the base-6 number we started with. This slow process for converting from base 10 to base 6 is made even slower by all the explanation that goes with it. Here is the process again, without all the words: 412/216 = 1 remainder 196 196/36 = 5 remainder 16 16/6 = 2 remainder 4 4/1 = 4 remainder 0 FAST METHODS These methods are faster because we don't need to deal with the place values for base 6; the only number we need to use is the base, 6. *** Base 6 to Base 10, Fast Method ---------------------------------- To convert 1524 (base 6) to base 10 with the fast method, we start with the leftmost digit and move right; at each step we multiply by 6 and add the next base-6 digit, until we have used all the digits. For the conversion of 1524 (base 6) to base 10, the process is as follows: base-6 equivalent action base-10 value of this base-10 value ------------------------------------------------------------------- get first base-6 digit (1) 1 1 multiply by 6 6 10 add next digit (5) 11 15 multiply by 6 66 150 add next digit (2) 68 152 multiply by 6 408 1520 add last digit (4) 412 1524 In this process, we find the base-10 equivalent of our base-6 number by "building" the base-6 number from left to right. We start with the leftmost base-6 digit, 1; when we multiply by 6, we get the base-10 equivalent of the base-6 number 10, and when we then add the next base-6 digit (5), we get the base-10 equivalent of the base-6 number 15; when we again multiply by 6 and add the next base-6 digit (2), we get the base-10 equivalents of the base-6 numbers 150 and then 152; and, finally, when we multiply again by 6 and then add the last base-6 digit (4), we get the base-10 equivalents of the base-6 numbers 1520 and finally 1524. *** Base 10 to Base 6, Fast Method ---------------------------------- Finally, here is the conversion of 412 (base 10) back to base 6, using the fast method: 412/6 = 68 remainder 4... so the base 6 number is XXX4 68/6 = 11 remainder 2... so the base 6 number is XX24 11/6 = 1 remainder 5... so the base 6 number is X524 1/6 = 0 remainder 1... so the base 6 number is 1524 When we divide the base-10 number 412 by 6 to get '68 remainder 4', we know that all but 4 of the 412 can be grouped into groups of 6; this tells us the the right-most digit of the base-6 equivalent of 412 (base 10) is 4. We now know that our base-10 number 412 is 68 groups of 6 with 4 left over. Next we divide the 68 by 6 to find that those groups can themselves be grouped into 11 groups of 6 with 2 left over; this tells us that the next digit to the left in our base-6 number is 2. And finally the 11 groups we now have can be grouped into 1 group of 6 with 5 left over, so the two leftmost digits of our base-6 number are 15. I hope you can use the above examples to figure out how to do your problem. Write back if you have any further questions on this. - Doctor Greenie, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/