Why use this calculator
Programmers constantly need to convert between number bases. Binary is how computers store data, hexadecimal is how colours and memory addresses are written, and octal appears in Unix file permissions. This converter handles all four bases simultaneously.
How to use it
Select your input base, enter your value, and instantly see all four representations: decimal, binary, hexadecimal, and octal.
The formula
All bases represent the same numeric value in different notation. Decimal uses 0-9, Binary uses 0-1, Octal uses 0-7, Hex uses 0-9 and A-F (where A=10, B=11...F=15).
Worked examples
Decimal 255
Binary: 11111111, Hex: FF, Octal: 377
Binary 10101010
Decimal: 170, Hex: AA, Octal: 252
Hex FF0000
Decimal: 16711680 (pure red in RGB)
When people use it
- Programming and debugging
- Understanding IP addresses and subnet masks
- Reading hex colour codes in CSS
- Unix/Linux file permissions (octal)
Tips
- One hex digit represents exactly 4 binary bits
- Two hex digits = one byte (8 bits) — e.g., FF = 11111111 = 255
- Unix file permissions like 755 or 644 are in octal
- Hex colour codes in web design use 3 pairs: RRGGBB
Questions people ask
- What is binary and why does it matter?
- Binary (base 2) uses only 0 and 1, mapping to the off/on states of electronic switches. Every piece of data in a computer is stored as binary. Understanding binary helps you understand how computers work at the hardware level.
- What does 0xFF mean?
- 0xFF is hexadecimal for 255 in decimal (11111111 in binary). The '0x' prefix indicates hexadecimal. In web colours, #FF0000 means maximum red, no green or blue — pure red.
- When is octal used?
- Octal (base 8) is most commonly used for Unix/Linux file permissions. chmod 755 means owner=7 (rwx), group=5 (r-x), others=5 (r-x). It also appears in legacy computer systems.