Search code examples
radix

Base 16 conversion


I have AB in base 16 and want to convert that to base 8.

A base 16 = 12 base 8 B base 16 = 13 base 8

we have ...

AB base 16 = 12 base 8 x 20^1 base 8 + 13 base 8 x 20^0 base 8 = 253 base 8

and now

Can someone explain where the hell 20 comes out from the base conversion?????

Thanks in advance!


Solution

  • Where the 20 comes from: 10 in base 16 = 16 in base 10 = 20 in base 8

    So the calculation can be thought of as: AB in base 16 = A * 10^1 + B * 10^0 in base 16 = 12 * 20^1 + 13 * 20^0 in base 8 = 240 + 13 in base 8 = 253 in base 8