Skip to content
CalcWorld

Browse all tools

Base Converter

The base converter turns a number from one base into another, anywhere from base 2 to base 36, and writes out the working. 1011 in binary is 11 in decimal and B in hexadecimal.

Sources: Wikipedia Updated

Convert numbers between different bases (2-36). See the step-by-step conversion process below.

Converted number

—

How the base converter works

A base, or radix, is how many different digits a number system uses before it carries to the next place. Decimal (base 10) uses 0 to 9, binary (base 2) uses 0 and 1, and hexadecimal (base 16) uses 0 to 9 and then A to F for 10 to 15.

Any whole number can be written in any base from 2 to 36, where the letters A to Z run out as extra digits. The converter always goes through decimal: it reads your number in the "from" base, works out its decimal value, then writes that value in the "to" base.

How to convert a number from one base to another

Convert 1011 from binary to hexadecimal.

  1. Multiply each digit by its place value and add: 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.
  2. Divide by the new base: 11 ÷ 16 = 0 remainder 11.
  3. Write each remainder as a digit of the new base and read them from the bottom up: 11 is B, so 1011₂ = B₁₆.

Step 1 on its own is what the binary to decimal converter does, and steps 2 and 3 on their own are the decimal to hexadecimal converter. Between binary and hex there is also a shortcut that skips decimal: the binary to hex converter groups the bits in fours.

Three steps: 1011 in base 2, add the place values 8 + 0 + 2 + 1 to get 11 in base 10, then divide by 16 to get remainder 11, which is B in base 16.
Every conversion goes through decimal: add up the place values, then divide by the new base.

Custom bases and digit checks

Choosing "Custom" on either side opens a box for any base from 2 to 36. Before converting, the tool checks every character against the digits allowed in the "from" base: 0 to 7 for base 8, 0 to 9 and A to J for base 20.

It names the character that does not belong instead of failing silently. If both bases are the same, it says no conversion is needed.

Where other number bases are used

Binary and hexadecimal are everywhere in programming: memory addresses, colour codes and bit masks. Octal survives in Unix file permissions, and the hex converter covers it next to hex and binary.

Bases outside those four are mostly for coursework on positional notation or for short codes such as base-36 IDs. All the conversion tools are listed on the number system converters page.

Base Converter: FAQ

Why does the base converter stop at base 36?

Base 36 uses the ten digits 0 to 9 and all 26 letters A to Z as digits. A bigger base such as base 100 would need 100 different digit symbols, more than the digits and letters provide.

How do I convert between two bases by hand?

Turn the number into decimal by adding each digit times its place value, then divide the decimal number by the new base again and again and read the remainders from the bottom up.

Can it convert fractions or negative numbers?

No, it works with whole numbers. For a decimal fraction such as 10.625, the decimal to binary converter handles the part after the point.

Sources