Convert numbers between binary, octal, decimal, and hexadecimal number systems with instant results.
2026-03-28T00:00:00Z
Number bases (or radix) are different ways of representing numbers using positional notation. The base determines how many unique digits are available and what each position represents. In our everyday decimal system (base-10), we use ten digits (0-9), and each position represents a power of 10.
Binary (base-2) uses only two digits: 0 and 1. Each position represents a power of 2. Octal (base-8) uses digits 0-7, with positions representing powers of 8. Hexadecimal (base-16) uses 0-9 and A-F, where A=10, B=11, C=12, D=13, E=14, and F=15, with positions representing powers of 16.
These different number systems are fundamental in computer science. Binary is the language of digital electronics (on/off states), hexadecimal provides a compact way to represent binary data (each hex digit = 4 binary bits), and octal was historically used in computing systems. Understanding conversions between these bases is essential for programming, networking, digital design, and data representation.
Type the number you want to convert. Make sure it's valid for the source base (e.g., binary only uses 0 and 1).
Choose the base your input number is in (Binary, Octal, Decimal, or Hexadecimal).
Select the base you want to convert to. Use the swap button to quickly reverse conversion direction.
See your number represented in all four bases simultaneously for easy comparison.
Converting Decimal 255 to Other Bases:
Digital circuits have two stable states (on/off, high/low voltage), making binary the natural choice. Transistors act as switches, representing 0 (off) and 1 (on), forming the foundation of all digital computing.
Each hexadecimal digit represents exactly 4 binary digits (bits). This makes hex a compact way to write binary: FF₁₆ = 11111111₂. Programmers use hex because it's much shorter than binary while being easily convertible.
Multiply each digit by its position's power of 2, then add them up. For 1011₂: (1×2³) + (0×2²) + (1×2¹) + (1×2⁰) = 8 + 0 + 2 + 1 = 11₁₀.
Octal is less common today but still appears in Unix file permissions (chmod 755), some assembly languages, and legacy systems. Each octal digit represents 3 binary bits.
In binary: 11111111₂ = 255₁₀ = FF₁₆. This is 2⁸ - 1 = 255. A byte (8 bits) can represent 256 different values (0-255).
Computers typically use two's complement representation. The leftmost bit indicates sign (0=positive, 1=negative), and negative numbers are represented in a special format that makes arithmetic operations simpler.
Yes! Fractional parts use negative powers. For example, 0.5₁₀ = 0.1₂ (which is 1×2⁻¹ = 0.5). However, some decimal fractions (like 0.1) have infinite representations in binary.
Hexadecimal is used everywhere in computing: memory addresses, color codes (#FF5733), MAC addresses, cryptographic hashes, assembly language, debugging, and low-level programming.
Related Tools
Generate .dockerignore files.
Convert binary to hexadecimal.
Convert binary to octal.
Convert decimal to hexadecimal.
Convert decimal to octal.
Convert HEX to RGB.