Guide
About Number Bases
How positional number systems work
In base 10, each digit position is worth ten times the one to its right: 345 means 3x100 + 4x10 + 5x1. Other bases work the same way with a different multiplier. In binary (base 2), 1011 means 1x8 + 0x4 + 1x2 + 1x1 = 11. Bases above 10 borrow letters for extra digits, so hexadecimal uses 0-9 and a-f, where f = 15.
Where each base shows up
- Binary: bit flags, network masks, and understanding how data is stored.
- Octal: Unix file permissions, for example
chmod 755= rwxr-xr-x. - Hexadecimal: colors (
#ff8800), memory addresses, byte dumps, UUIDs and hashes. One hex digit is exactly 4 bits, so a byte is always two hex digits. - Base 36: compact, case-insensitive IDs such as short URLs.
Prefixes in code
Most languages mark the base with a prefix: 0b1011 for binary, 0o17 for octal and 0xff for hex. The converter accepts these prefixes, plus underscores and spaces as digit separators, and the copy buttons add the prefix for you.
Frequently asked questions
Can it handle very large numbers?
Yes. Conversion uses JavaScript BigInt, so integers of any length convert exactly, unlike tools limited to 2^53.
Does it support negative numbers or fractions?
Negative integers are supported with a leading minus sign. Fractions are not, because many decimal fractions (like 0.1) have no exact representation in binary.
What is two's complement?
It is how computers store negative integers: in 8 bits, -1 is 11111111. This converter shows the mathematical value with a minus sign rather than a fixed-width two's complement pattern.