Name
__________________________ Date:
___/___/____
Mr. Merlis Block
___3 - _____
AP CS - Java Day
of Class: _34_
Converting
Between Bases
We use a
“base 10 positional notation” system.
In simple
terms, it means that each digit in a number corresponds to the number of
multiples of the base at that power.
Ie. 37910
= 3 x 102 + 7 x 101 + 9 x 100
To convert
from base10 to base8, we must first think how the number
should appear:
__ x 82 + __ x 81 +
__ x 80
In the case
of 379, 82 (64) goes into it
5 times (with a remainder), so we immediately have:
5 x 82 (320)
_ x 81
_ x 80
Having
already the value of 320, only 379-320 = 59 remains.
So now we
divide 59 by 8 (81) and we get 7 (with a remainder), giving us:
5 x 82 (320)
7 x 81 (56)
_ x 80
Only
needing 59 more and getting 56 leaves us with a remainder of 3. Since we are now at the units digit, we can
simply put it there, giving us a final answer of:
5 x 82 + 7 x 81 + 3 x 80
Convert the following two base10
numbers into the given base.
a)
base 8 b)
base 16 c) base 2