Binary Converter

Binary Converter

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

2026-03-28T00:00:00Z

Number Base Converter

What are Number Bases?

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.

How to Convert Number Bases

Conversion Steps

1

Enter Your Number

Type the number you want to convert. Make sure it's valid for the source base (e.g., binary only uses 0 and 1).

2

Select Source Base

Choose the base your input number is in (Binary, Octal, Decimal, or Hexadecimal).

3

Choose Target Base

Select the base you want to convert to. Use the swap button to quickly reverse conversion direction.

4

View All Conversions

See your number represented in all four bases simultaneously for easy comparison.

Conversion Example

Converting Decimal 255 to Other Bases:

Given:
Decimal: 255
To Binary:
Repeatedly divide by 2:
255 ÷ 2 = 127 R1
127 ÷ 2 = 63 R1
63 ÷ 2 = 31 R1
...
Read remainders bottom-to-top: 11111111
To Hexadecimal:
Divide by 16:
255 ÷ 16 = 15 R15
15 = F in hex, 15 = F
Result: FF
To Octal:
Divide by 8:
255 ÷ 8 = 31 R7
31 ÷ 8 = 3 R7
3 ÷ 8 = 0 R3
Read remainders: 377
Summary:
Binary: 11111111
Octal: 377
Decimal: 255
Hexadecimal: FF

Frequently Asked Questions

Why do computers use binary?

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.

What's the relationship between hex and binary?

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.

How do I convert binary to decimal?

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₁₀.

When would I use octal?

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.

What's the largest number in 8 bits?

In binary: 11111111₂ = 255₁₀ = FF₁₆. This is 2⁸ - 1 = 255. A byte (8 bits) can represent 256 different values (0-255).

How do negative numbers work in binary?

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.

Can I convert fractions between bases?

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.

Where are hex numbers used?

Hexadecimal is used everywhere in computing: memory addresses, color codes (#FF5733), MAC addresses, cryptographic hashes, assembly language, debugging, and low-level programming.

Related Tools