Converting Between Base-10 and Base-n Numbers

advertisement
Converting Between Base-10 and Base-n Numbers
Both of the following number conversions use a solution layout in which the digits of the
number in the base-n system will be written in the placeholders above the dotted line in the
diagram below. The columns should be distinct and widely spaced, with column boundaries
between, and with whole number column headers at the top of each column. A dotted line
will be drawn below the base-n number’s position. Above the line the numbers and digits
will be in base-n, and below the line all work will be in base-10.
5
4
3
2
1
0
-1
-2
.
___ | ___ | ___ | ___ | ___ | ___ |
___ | ___ | <-Base-n
- - - - - - - - - - - - - - - - - - - - - - - - - - 5 |
4 |
3 |
2 |
1 |
0 |
-1|
-2| | Base-10
n | n | n | n | n | n |
n | n | V
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Diagram used for converting between bases. Use as many columns as are needed.
Converting Base-n to Base-10
1. Write the given base-n number in the placeholders above the dotted line in the
diagram above, paying attention to the location of the decimal point.
2. Starting with the column to the left of the decimal point, label the top of the column
with the positive integers, starting with zero. Label the tops of the columns to the
right of the decimal point with the negative integers.
3. Write the base (n) below each digit of the base-n number. Raise this base to the power
at the top of the column. Then compute this number and write it below in the same
column. Use the calculator, if needed. (The column just to the left of the decimal
point is always going to be the ‘ones’ column.)
4. For each column, multiply the number you just computed by the digit that is in the
base-n number for that column.
5. Add up all the results of the multiplications for all the columns. This is your base-10
number.
Converting Base-10 to Base-n
1. Do not write anything in the spaces above the dotted line. Instead, draw lines as
placeholders for the digits of the base-n number that you are asked to find. The digits
will be filled in based on the procedures below.
2. Starting with the column to the left of the decimal point, label the top of the column
with the positive integers, starting with zero. Label the tops of the columns to the
right of the decimal point with the negative integers.
3. Write the base (n) below each digit of the base-n number. Raise this base to the power
at the top of the column. Then compute this number and write it below in the same
column. Use the calculator, if needed. (The column just to the left of the decimal
point is always going to be the ‘ones’ column.)
4. Discard any columns for which the number you just computed is _greater_than_ the
given base-10 number.
5. Beginning with the left-most remaining column, write the given base-10 number at
the bottom of the column.
6. Divide the base-10 number by the base-raised-to-the-power that you computed in step
3 for this column. You will have a whole-number result and a whole-number
remainder. (Either of these whole-numbers may be zero.)
7. Copy the whole-number result into the placeholder at the top of the column. Copy
the whole-number remainder to the bottom of the next column to the right. This
whole-number remainder becomes your new base-10 number.
8. Move to this next column to the right, and repeat the procedures above, beginning
with step 6. You will be done when the placeholders at the top of each column have
been filled.
9. If at any point you have a whole-number remainder of zero in step 6, you may fill the
remaining placeholders in the base-n number with zeros. You are done.
10. Check the resulting base-n number to make sure none of its digits are equal to or
greater than n. You may also want to convert the result back to base-n to check your
answer.
Download