Base Converter CalculatorFree online math calculator — instant results, no sign-up

Convert signed integers between bases two through thirty-six.

Inputs

Converted integer
2D

Sign in to save results and favorites.

About the Base Converter Calculator

The Base Converter Calculator converts signed integers between bases 2 through 36 using digits 0–9 and letters A–Z. It changes the representation of an integer without changing its value. With Integer set to 101101, Source base set to 2, and Target base set to 16, the converted integer is 2D.

Integer
The signed whole-number numeral to convert, interpreted in the source base; it is dimensionless and defaults to 101101.
Source base
The dimensionless integer radix from 2 through 36 used to interpret the input digits, defaulting to 2.
Target base
The dimensionless integer radix from 2 through 36 used to write the converted integer, defaulting to 16.

Formula and method

N = s × Σ(i = 0 to k − 1) d_i b^i = s × Σ(j = 0 to m − 1) e_j c^j. For the default inputs: N = 1×2^5 + 0×2^4 + 1×2^3 + 1×2^2 + 0×2^1 + 1×2^0 = 45. Since 45 = 2×16 + 13 and digit value 13 is D, 101101 in base 2 = 2D in base 16.
  • NThe integer value, which remains unchanged during conversion.
  • sThe sign multiplier: +1 for a nonnegative integer and −1 for a negative integer.
  • bThe source base; 2 in the worked example.
  • cThe target base; 16 in the worked example.
  • d_iThe numeric value of the source digit at position i, counting from the right starting at zero.
  • e_jThe numeric value of the target digit at position j, counting from the right starting at zero.
  • k, mThe number of source digits and target digits, respectively, excluding the sign.
  • i, jThe source and target position indices used in the positional-value sums.

Separate the sign from the digits and check that both bases are integers from 2 through 36. Map digits 0–9 to values 0–9 and letters A–Z to values 10–35, rejecting any digit whose value is at least the source base. Evaluate the input magnitude using source-base place values, then repeatedly divide it by the target base, collecting remainders. Read the remainders in reverse order, encode values above 9 as letters, and restore the negative sign if needed. Represent zero as 0.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • Integer101101
  • Source base2
  • Target base16

Results

  • Converted integer2D

How to use the Base Converter Calculator

  1. 1Enter 101101 in Integer for the default worked example.
  2. 2Set Source base to 2 so the input is read as binary.
  3. 3Set Target base to 16 to request hexadecimal output.
  4. 4Run the conversion; the binary place values sum to 45, and division by 16 gives quotient 2 and remainder 13.
  5. 5Read Converted integer as 2D, where D represents the remainder value 13.

Reading your result

The Converted integer row displays the same signed integer written in the target base. For the default inputs, 2D is hexadecimal: its place values are 2×16 and 13, totaling 45, the same value as binary 101101. The output is a numeral in the selected target base, not necessarily a decimal number.

Limitations

Only whole numbers and integer bases from 2 through 36 are supported; fractional parts and scientific notation are outside this tool’s purpose. Every input digit must be valid in the source base. Negative values use a leading minus sign rather than a fixed-width two’s-complement encoding. Leading zeros do not affect the value and need not be preserved in the output. Maximum input length and exact-integer capacity depend on the implementation; unlimited precision is not guaranteed.

Common questions

Why does binary 101101 become hexadecimal 2D?+

Binary 101101 equals 32 + 8 + 4 + 1 = 45. In base 16, 45 is 2×16 + 13, and the hexadecimal digit for 13 is D.

Which letters can appear when converting to bases above 10?+

Letters A–Z represent values 10–35. A base uses only digits with values below that base, so base 16 uses 0–9 and A–F, while base 36 can use all digits 0–9 and letters A–Z.

How are negative integers converted?+

The magnitude is converted between bases and the minus sign is retained. This is signed numeral conversion, not conversion to a binary storage format such as two’s complement.

Does the calculator infer the source base from the digits?+

The Source base input determines how the numeral is interpreted. For the worked example, select 2 explicitly so that 101101 is interpreted as binary rather than as a numeral in another base.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.