Number Base Converter

Enter a number and see it in binary, octal, decimal and hexadecimal right away.

Negative numbers are supported. Prefixes such as 0x, 0b and 0o are accepted.

What is a number base?

A number base (radix) is how many distinct digits a numbering system uses. Decimal uses 0-9, binary uses 0 and 1, octal uses 0-7, and hexadecimal uses 0-9 plus A-F. Computers store data in binary, while hexadecimal is a compact way to write it.

How is it calculated?

To read a number, multiply each digit by the base raised to its position and add the results; for example binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10. To convert to another base, divide repeatedly by that base and read the remainders from last to first.

FAQ

How do I convert binary to decimal?

Select Binary, then type the binary number. The decimal result appears immediately. For example 1111 in binary is 15 in decimal.

Can it convert negative or very large numbers?

Yes. Add a minus sign for negative numbers. Calculations use arbitrary-precision integers, so very long numbers are not rounded. Fractions are not supported.

Why does hexadecimal use letters?

One hexadecimal digit stands for 16 values, but only ten digits (0-9) exist, so A to F stand for 10 to 15. Each hexadecimal digit equals exactly four binary digits, which makes it handy for colors and memory addresses.