Quick Answer
Number base conversion works by parsing the input in its original base, converting to decimal (base-10), then re-expressing that decimal in the target base. For example: binary 11111111 = decimal 255 = hex FF = octal 377.
What Is Number Base?
A number base (or radix) system defines how many digits are used before the count rolls over to the next place value. Decimal uses base 10 (digits 0–9). Binary (base 2) uses only 0 and 1. Octal (base 8) uses digits 0–7. Hexadecimal (base 16) uses digits 0–9 plus letters A–F for values 10–15.
Different bases have real-world uses: Binary is fundamental to how all digital electronics work, every file and value in a computer is stored and processed as binary. Hexadecimal is used in programming because each hex digit represents exactly 4 binary digits, making binary values much shorter to write. Octal appears in Unix/Linux file permission systems.
This converter takes any number in binary, octal, decimal, or hexadecimal and shows all four representations simultaneously, useful for programmers, students, and anyone working with digital systems.
How to Use
- 1Type your number in the input field.
- 2Select the base you're converting FROM: Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16).
- 3All four base representations update instantly.
Formula
Parse input in original base → decimal integer → re-express in each target base11111111₂ = 1×128 + 1×64 + 1×32 + 1×16 + 1×8 + 1×4 + 1×2 + 1×1 = 255₁₀A=10 B=11 C=12 D=13 E=14 F=15Example: Convert decimal 255 to all bases
- Binary: 11111111
- Octal: 377
- Hex: FF
Tips & Things to Know
- Hex is used in web colors: #FFFFFF = white, #000000 = black, #FF0000 = red.
- One byte = 8 binary bits = 2 hex digits. Max value of one byte: 11111111₂ = FF₁₆ = 255₁₀.
- Hex in code: 0xFF (C/Python), #FF (CSS), $FF (Assembly).
- In Unix/Linux file permissions, chmod 755 uses octal: 7 = rwx (read+write+execute), 5 = r-x (read+execute). Octal is compact for encoding three-bit groups.
- Hex color codes in CSS are two-digit hex pairs for Red, Green, Blue, #FF5733 means R=255, G=87, B=51. This converter helps decode or verify color values.
- Binary numbers get long quickly: decimal 1000 = 1111101000 in binary (10 digits). Hexadecimal is preferred in programming because each hex digit represents exactly 4 binary digits.