math – How can I convert a number from base 8 to base 10?

math – How can I convert a number from base 8 to base 10?

To convert any base to base 10 just do the following:

For every digit in the different base multiply that by the base and digit. For example:

75 (base 8) = 7*8^1 + 5*8^0 = 61 

Works for any base … binary, hex, you name it just do that and it will convert to base 10.

0 * 85 + 0 * 84 + 0 * 83 + 0 * 82 + 7 * 81 + 5 * 80 = 61

math – How can I convert a number from base 8 to base 10?

The formula is 18 = 110 and 108 = 810. Everything else can be derived from that.

If you have a sequence of base 8 digits you want to convert to a base 10 number, process them from left to right, keeping a total you initialize at zero. For each digit x, set the total to 8*total+x. After processing the last digit, the total will be the base ten value of the base 8 sequence.

Leave a Reply

Your email address will not be published.