Base Converter

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

Base 10: Use digits 0-9
Enter a value to see the conversion
Base 16: Uses digits 0-9 and A-F

Examples & References

Common Conversions

Decimal 255:

  • Binary: 11111111
  • Octal: 377
  • Hexadecimal: FF

Decimal 1024:

  • Binary: 10000000000
  • Octal: 2000
  • Hexadecimal: 400

Number System Basics

  • Binary (Base 2): Uses digits 0-1. Example: 10112 = 1×23 + 0×22 + 1×21 + 1×20 = 8 + 0 + 2 + 1 = 1110
  • Octal (Base 8): Uses digits 0-7. Example: 378 = 3×81 + 7×80 = 24 + 7 = 3110
  • Decimal (Base 10): Uses digits 0-9. Example: 12310 = 1×102 + 2×101 + 3×100 = 100 + 20 + 3 = 12310
  • Hexadecimal (Base 16): Uses digits 0-9 and A-F. Example: 2F16 = 2×161 + 15×160 = 32 + 15 = 4710

Programming Use Cases

  • Color Codes: #FF0000 (red) = 255,0,0 in decimal
  • Memory Addresses: 0x400000 (hex) = 4194304 (decimal)
  • File Permissions: 755 (octal) = rwxr-xr-x
  • Bit Manipulation: Converting between binary and hex for bitwise operations

Input Format Guidelines

  • Binary: Enter only 0s and 1s (e.g., 1010)
  • Octal: Enter digits 0-7 (e.g., 755)
  • Decimal: Enter digits 0-9 (e.g., 1024)
  • Hexadecimal: Enter 0-9 and A-F (case insensitive, e.g., FF or ff)

Note: Prefixes like 0x, 0b, or 0o are not required - just enter the number itself.

Back to Tools