Skip to main content

The Complete Guide to Number Base Conversion

Understanding Number Bases

Computers use binary (base 2), but humans prefer decimal (base 10). Programmers frequently work with hexadecimal (base 16) and octal (base 8) as convenient representations of binary data.

Number Systems

  • Binary (Base 2) — Uses only 0 and 1. The native language of computers.
  • Octal (Base 8) — Uses digits 0-7. Sometimes used in Unix file permissions.
  • Decimal (Base 10) — Our everyday number system using digits 0-9.
  • Hexadecimal (Base 16) — Uses 0-9 and A-F. Common in colors (#FF5733) and memory addresses.

Tips

  • Hex is compact — One hex digit represents exactly 4 binary bits.
  • Prefixes help — 0b for binary, 0o for octal, 0x for hex in most programming languages.
  • Practice with small numbers — Master converting 0-15 between bases and larger numbers become easy.
  • Try These Number Converters