Search

External Platforms & Social Media

Arbitrary Base Conversion


Using floating point division, modulus (finding the remainder), and floor rounding, it is possible to convert any number from base 10, into base n.

Beyond base 10, we need to assign other symbols to the digit, or include delimiters, in order to convert back into base 10.

For example, hexadecimal, base 16, uses the letters A to Z, and base 64 uses other symbols. Embedded data and cryptographic signatures are often shown as a sequence of base 64 numbers.

Converting a number from another base, back into base-10 is easier: it is the sum of each digit is multiplied by the base, to the power of the digit position, starting from zero on the right. For example:

1001_2 = (1*2^0)+(0*2^1)+(0*2^2)+(1*2^3) = 9_10

Number Base Converter

Input

  • Input base:
  • Input value:

Output

  • Output base:
  • Output value: