Base n converter

Calculations such as what percent of a certain number is, or X percent of a certain number are some.

Before conversion:

How to use Base n converter

Select the base number before and after conversion, and enter the number you want to convert.

Please enter the numerical value according to the base number before conversion.

Click the "Convert" button to display the converted calculation results.

The calculation method for conversion is also displayed.

Numerical input range

Binary to Decimal : Value from 0 to (base-1)

Binary : 0–1
Base 3 : 0–2
Decimal : 0–9

Base 11 to Base 36 : Value from 0 to (base-1),(base-10)th alphabet from A

Base 11 : 0–9, A
Base 12 : 0–9, A–B
Base 36 : 0–9, A–Z

How to convert from base n to base n

Method of calculation

When converting an n-ary number to an base n number, first convert the base n number to a decimal number.

Next, convert the decimal number to the base n number you want to convert from the base n number to the nase n number.

If one of the numbers is a decimal number, only the conversion is performed from an base n number to a decimal number or from a decimal number to an base n number.

In decimal numbers and above, numbers 11 and above are represented by alphabets, so they are converted to numbers for calculation.

Conversion from base n to decimal

An base n number starts from the first digit and continues as n0, n1, n2, n3 .

Therefore, when converting an base n number to a decimal number, you can find it by calculating the number of digits x nnumber of digits for each digit.

Conversion from decimal to base n

To convert a decimal number to an base n number, divide the decimal number by n until it becomes 0, and then get Remainder.

  • Suppose you want to convert from an base n number to an base m number.
  • 1. Calculates nnumber of digits for each digit.
  • 2. The sum of all digit values x nnumber of digits is the result of converting to a decimal number.
  • 3. The sum of all calculated numbers is the result of converting to decimal.
  • 4. Divide this decimal value by m, the base m number you want to convert, to get Quotient and Remainder.
  • 5. Divide the next Quotient by m to get Quotient and Remainder, and repeat until Quotient becomes 0.
  • 6. The number obtained by reversing Remainder is the result of converting from an base n number to an base m number.

Calculation example

Example: Convert Hexadecimal "3B0C" to Octal

First, convert from hexadecimal to decimal.

Calculates 16number of digits for each digit.

DigitHexadecimal16n
1 C = 12 160 = 1
2 0 161 = 16
3 B = 11 162 = 256
4 3 163 = 4096

Calculating the number of non-zero digits x 16n yields "12×160 + 11×162 + 3×163 = 12 + 2816 + 12288 = 15116".

Therefore, converting hexadecimal number "3B0C" to decimal number becomes "15116".

Convert this decimal number "15116" to octal number.

FormulaQuotientRemainder
15116÷818894
1889÷82361
236÷8294
29÷835
3÷803

Arranging the remaining numbers in reverse order gives 35414.

Therefore, the value converted from hexadecimal 3B0C to octal is "35414".

CalculatorSimple Calculator

Save results in a temporary