Toggle language
Toggle theme

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal number systems

Quick Reference:

Binary: 0, 1
Octal: 0-7
Decimal: 0-9
Hex: 0-9, A-F
Common Values:
Dec
Bin
Oct
Hex
10
1010
12
A
255
11111111
377
FF

Understanding Number Systems

Computers and programmers work with different number systems (bases) for various purposes. Each base represents numbers using a specific set of digits.

Binary (Base 2)

Binary uses only 0 and 1, representing the on/off states of electronic circuits. It's the fundamental language of computers. Each digit is called a bit, and 8 bits make a byte.

  • Used in: Computer hardware, low-level programming, networking
  • Prefix: 0b (e.g., 0b1010 = 10)

Octal (Base 8)

Octal uses digits 0-7. It's a compact way to represent binary (each octal digit = 3 binary digits). Common in Unix file permissions.

  • Used in: Unix permissions (chmod 755), legacy systems
  • Prefix: 0o or 0 (e.g., 0o755)

Decimal (Base 10)

Decimal is the standard human number system using digits 0-9. We use it daily because we have 10 fingers!

  • Used in: Everyday counting, mathematics, finance
  • No prefix needed

Hexadecimal (Base 16)

Hexadecimal uses 0-9 and A-F (10-15). It's compact and directly maps to binary (each hex digit = 4 binary digits). Widely used in programming.

  • Used in: Colors (#FF0000), memory addresses, MAC addresses
  • Prefix: 0x (e.g., 0xFF = 255)

Conversion Examples

DecimalBinaryOctalHex
0000
10101012A
25511111111377FF
40961000000000000100001000