Number Base Converter

Explore how numbers are represented in different bases. Convert between binary, decimal, hexadecimal, and octal formats with visualizations.

Base Converter

Base 2 Binary
Only 0 and 1 allowed
Base 10 Decimal
Standard numbers (0-9)
Base 16 Hexadecimal
0-9 and A-F
Base 8 Octal
Only 0-7 allowed

Binary Visualization

Common Values Reference

Description Decimal Binary Hex Octal
Max byte value 255 11111111 FF 377
ASCII 'A' 65 01000001 41 101
Unix rwxr-xr-x 493 111101101 1ED 755
1 Kilobyte 1024 10000000000 400 2000
Max 16-bit 65535 1111111111111111 FFFF 177777

Understanding Number Bases

Binary (Base-2)

Uses only 0 and 1. Each position represents a power of 2. This is how computers store all data internally.

1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10

Decimal (Base-10)

Our everyday number system with 10 digits (0-9). Each position represents a power of 10.

255 = 2×100 + 5×10 + 5×1

Hexadecimal (Base-16)

Uses 0-9 and A-F (where A=10, B=11... F=15). Popular for colors, memory addresses, and compact binary representation.

FF = 15×16 + 15×1 = 255

Octal (Base-8)

Uses digits 0-7. Historically used in computing, still seen in Unix file permissions (e.g., chmod 755).

377 = 3×64 + 7×8 + 7×1 = 255

How to Read the Results

When you enter a number in any format, it will be converted to all other formats. The binary visualization shows how each bit contributes to the decimal value.

  • Binary (Base-2): Uses only 0 and 1 digits
  • Decimal (Base-10): Standard counting system we use daily
  • Hexadecimal (Base-16): Uses 0-9 and A-F, common in programming
  • Octal (Base-8): Uses only 0-7 digits

Limitations & Considerations

Number precision. Very large numbers may lose precision during conversion.

Base restrictions. Each base has valid character ranges: binary (0,1), octal (0-7), decimal (0-9), hexadecimal (0-9,A-F).

Storage limits. Some programming languages have different limits for integer sizes.