Convert to Decimal

Converts a number to decimal from binary, octal, hexadecimal, or any other base up to 36.

A number converts to decimal by expanding it into powers of its base. Each digit is multiplied by the base raised to the power of its position, counting from zero on the right, and the results are added together.

From binary

10011100 is 1·2⁷ + 0·2⁶ + 0·2⁵ + 1·2⁴ + 1·2³ + 1·2² + 0·2¹ + 0·2⁰, that is, 128 + 16 + 8 + 4 = 156. You can skip the zeros: only the powers of two with a 1 in that position get added.

From hexadecimal

Where digits run out, letters take over. A means 10, B means 11, and so on up to F, which equals 15. So FF is 15·16 + 15 = 255, and DEADBEEF is 3,735,928,559. In bases above 16 the letters continue up to Z, which equals 35.

From any other base

One rule covers every base: 513 in base 7 is 5·49 + 1·7 + 3 = 255. Pick any base from 2 to 36, and the answer also shows the same number in binary, octal, and hexadecimal.

Rate this tool

Help us get better

Other tools