Base Conversions

If you came here from a search engine click here for what this page is intended for.

This page will show you how do convert from base 10 to base 8 or base 16.

There are probably many ways to do this, I think the method here is best because it just uses basic math that any cheap calculator can do.

Since the Rama counting test machines can only go up to a certain number, I'll use 125 as an example of a large number.

The first thing to do in each conversion is to figure out how many digits the new number is going to be. Use the table below:

To use the table first choose the column for the base you want to convert to, then find the range of numbers that includes the base 10 number you want to convert, the number in the first column is how many digits the new number will be.

Number of digits Base 8 Base 16
1 0 - 7 0 - 15
2 8 - 63 16 - 255
3 64 - 511 256 - 4095
4 512 - 4095 4096 - 65535

Base 10 to base 8

For each digit over the ones place you divide to get the digit and then subtract what you divided by to continue.
For a 4 digit number to get the:
1st digit you divide by 8x8x8, then subtract the 1st digit x8x8x8 (1st digit x512)
2nd digit you divide by 8x8, then subtract the 2nd digit x8x8 (2nd digit x64)
3rd digit you divide by 8, then subtact 3rd digit x8
4th digit is the result of the last subtraction.

Using 125 as the example, the chart above says the base 8 number will be 3 digits.

To get the 1st digit divide the number by 8x8:
125/64=1.95
Use only the whole number (don't round) and the 1st digit is 1.

To get the 2nd digit subtract the 1st digit x8x8 and divide what is left by 8:
1x8x8=64, 125-64=61, 61/8=7.625
Use only the whole number (don't round) and the 2nd digit is 7.

To get the 3rd digit subtract the 2nd digit x8 from what was left from the previous subtraction:
7x8=56, 61-56=5 The 3rd digit is 5.

So, 125 in base 10 is 175 in base 8.


Base 10 to base 16

For each digit over the ones place you divide to get the digit and then subtract what you divided by to continue.
For a 4 digit number to get the:
1st digit you divide by 16x16x16, then subtract the 1st digit x16x16x16 (1st digit x4096)
2nd digit you divide by 16x16, then subtract the 2nd digit x16x16 (2nd digit x256)
3rd digit you divide by 16, then subtact 3rd digit x16
4th digit is the result of the last subtraction.

Using 125 as the example, the chart above says the base 16 number will be 2 digits.

To get the 1st digit divide by 16:
125/16=7.8
Use only the whole number (don't round) and the 1st digit is 07.

To get the 2nd digit subtract the 1st digit x16 from the original number:
7x16=112, 125-112=13 The 2nd digit is 13

So, 125 base 10 is 07:13 base 16

BACK

This page has been accessed times since November 30, 96.