Number bases in short
- Binary (base 2) uses 0 and 1, the way computers store everything.
- Octal (base 8) uses 0–7. You’ll see it in Unix file permissions like
755.
- Decimal (base 10) is everyday counting.
- Hexadecimal (base 16) uses 0–9 and A–F. It’s used for colours (
#FF5A1F), memory addresses and bytes: two hex digits are exactly one byte.
Example
255 in decimal is 11111111 in binary (eight 1s, one full byte), 377 in octal and FF in hex.
Frequently asked questions
How do I convert binary to decimal?
Type the binary number in the Binary box and the decimal (and every other base) appears straight away. By hand: multiply each digit by 2 to the power of its position, counting from 0 on the right, and add them up. 1011 is 8 + 0 + 2 + 1 = 11.
How big can the numbers be?
As big as you like. The converter uses whole-number arithmetic with no size limit, so 64-bit, 128-bit and longer values convert exactly.
Can I paste values like 0xFF or 0b1010?
Yes. The prefixes 0x, 0b and 0o are understood, and spaces and underscores used to group digits are ignored.
What is two's complement?
The way computers store negative whole numbers. For a negative number, the converter also shows its two's complement in binary and hex at 8, 16, 32 or 64 bits.