Download Number Bases

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
Presented by:
Tutorial Services
The Math Center
Base 10 to Different Number Bases
When converting a number from base 10 to another base follow these steps:
1.
2.
3.
4.
5.
6.
7.
Take the number you want to convert to a different base and divide by the new
base.
When dividing, write the answer with the remainder.
Take the quotient, not the remainder, and again divide the new number by the
base.
Write your answer with the remainder.
Next, follow the third step again.
Repeat steps 3 and 4 until you get to an answer where you can no longer
divide the quotient by the base. For example if 1 is the quotient and 2 is the
base, 1 / 2 will not divide into a whole number. You stop here.
To write your answer, take the last number you get as a quotient when doing
the division and write the remainders next to it starting from the last remainder
you got, to the first remainder. Don’t forget to put the base as a subscript at the
end of the number.
Example
Convert 45 to base 2.
45 / 2
22 / 2
11 / 2
5/2
2/2
Stop --> 1 / 2

Quotient
22
11
5
2
1
Remainder
1
0
1
1
0
Take the last quotient you got before you stopped, and that would
be the first digit of the new number in base 2. Next, write the
remainders starting from the last remainder you got, to the first
remainder.
Answer: 45 = 1011012
Exercise
Convert 94 to base 6.
Solution:
Quotient
Remainder
94 / 6
15 / 6
Stop -> 2/ 6
15
2
Answer: 94 = 2346
4
3
Numbers in Different Bases to Base 10
When converting numbers in different bases to base 10 follow these steps:
1.
2.
3.
4.
First count the amount of digits in the number you will process.
(i.e. 25 has 2 digits)
Then, take the first number going from left to right and multiply it by the
base it is on raised to one number less than the total numbers of digits in
the number. (i.e. 202 has 2 digits, therefore the first operation should look
like this (2 x 2^1), where 2 is the first digit in the number 202 and 2^1 is the
base being raised to its corresponding power.)
Keep doing this subsequently with the following numbers.

Note that each subsequent digit needs to be multiplied by the base
raised to one power less then the previous operation. Keep in mind the
last digit will need to be multiplied by 2^0.
Finally, add all the results from steps 2 and 3 to get your result in base 10.
Example
Convert 1011012 to base 10

The number of digits in the number 1011012 is equal to 6,
therefore the first operation should start with a power of 5.
(1 x 25) + (0 x 24) + (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20)
(1 x 32) + (0 x 16) + (1 x 8) + (1 x 4) + (0 x 2) + (1 x 1)
32 + 0 + 8 + 4 + 0 + 1
45
Exercise
Convert 2346 to base 10
Solution:
(2 x 62) + (3 x 61) + (4 x 60)
(2 x 36) + (3 x 6) + (4 x 1)
72 + 18 + 4
94
Addition and Subtraction in Other
Bases
When adding numbers in different bases follow these steps:
1.
2.
3.
4.
5.
First add the numbers as you would normally do it.
Ask yourself, how many times does the base go into the sum.
If the base does not go into the sum, place the resultant of the sum
as part of the answer.
If the base goes into the sum, place the remainder as part of the
answer and carry over the quotient (the number of times the base
goes into the sum).
Repeat steps 1 and 2 for the subsequent additions.
Addition and Subtraction in Other
Bases (cont.)
To subtract numbers in different bases follow these rules:
1.
2.
3.
4.
5.
Subtract as you would normally do it.
If you cannot subtract because the number is smaller
than the one you are subtracting, then you will have to
borrow from the following number. Borrow the amount
of the base and add to the number that needed the
borrowing.
The number from which you are borrowing will need to
decrease by one.
If the number from which you are borrowing happens
to be zero, then you will have to borrow from the
following number.
Repeat steps 2 and 3.
Examples
Addition:
Subtraction:
11012
10012
 1112
10100 2
 110 2
00112
Exercise(s)
Add
Subtract
10223
30325
 21213
 10045
Solution:
Solution:
10223
30325
 21213
 10045
102203
20235
Multiplication In Different Bases
Multiplication Procedure
1.
2.
3.
4.
5.
6.
Multiply as you would normally do.
Figure out how many times the base goes into the resultant of the
numbers multiplied.
The remainder of the previous step goes on the bottom and how
many times the base goes into the resultant carries over. (If the
resultant is less then the base number, leave the resultant as part
of your answer on the bottom where the remainder would
normally go.)
Keep doing this for every column.
Add like you normally would for adding numbers of the same
base.
Get your answer
Multiplication Examples
Example 1
Example 2
1112
437
 1012
 257
111
311
0000
11100
1000112
1160
15017
Multiplication Exercise
Multiply
Solution
2349
234 9
X 259
 259
1282
 4680
6072 9
Division in Different Bases
Division Procedure:
1. Construct a multiplication table with the
corresponding base.
2. Divide as you normally would.
3. Combine all the previous rules for addition,
subtraction and multiplication in order to arrive
to the expected answer.
Division Exercise(s)
445
25 1435
 13
13
 13
0
Multiplication Table
25  15  25
25  25  45
25  35  115
25  45  135
256
56 2216
 14
41
 41
0
Multiplication Table
56  16  56
56  2 6  14 6
56  36  236
56  4 6  32 6
56  56  416
Number Bases Links
Logic Workshop Student Handout
 Truth Tables Handout
