Binary Calculator

Convert between binary, decimal, octal, and hexadecimal. Perform binary arithmetic.

A binary calculator converts numbers between binary, octal, decimal, and hexadecimal bases and performs arithmetic in any base.

Select an operation (convert or arithmetic). Enter values in the chosen base. For conversion, select source and target bases. For arithmetic, both values must be in the same base.

Examples

Binary to Decimal

1010₂ = 1×8 + 0×4 + 1×2 + 0×1 = 10₁₀

Binary addition

1010₂ + 1100₂ = 10110₂ (10 + 12 = 22)

Hex to Binary

FF₁₆ = 11111111₂ = 255₁₀

Frequently Asked Questions

Why is binary important?
Computers use binary (base 2) because digital circuits have two states: on (1) and off (0). All computer data is stored and processed in binary.
What is hexadecimal used for?
Hexadecimal (base 16) is a compact way to represent binary data. Each hex digit represents exactly 4 binary digits. It is used for colors (#FF0000), memory addresses, and more.
How do I convert decimal to binary?
Divide by 2 repeatedly and record the remainders. Read the remainders from bottom to top. For example: 13 = 1101₂.
Ad Space

Quick Tips

  • Double-check your inputs — small errors lead to incorrect results.
  • When converting, ensure the input digits are valid for the selected source base.
  • Use the conversion mode to quickly translate between number systems.

A binary calculator converts numbers between binary, octal, decimal, and hexadecimal bases and performs arithmetic in any base.

How to Use This Calculator

Select an operation (convert or arithmetic). Enter values in the chosen base. For conversion, select source and target bases. For arithmetic, both values must be in the same base.

Understanding the Formula

Base conversion: divide by target base repeatedly, read remainders bottom-to-top. Binary: base 2 (0,1). Octal: base 8 (0-7). Hex: base 16 (0-F).

Examples

Binary to Decimal

1010₂ = 1×8 + 0×4 + 1×2 + 0×1 = 10₁₀

Binary addition

1010₂ + 1100₂ = 10110₂ (10 + 12 = 22)

Hex to Binary

FF₁₆ = 11111111₂ = 255₁₀

Frequently Asked Questions

Why is binary important?

Computers use binary (base 2) because digital circuits have two states: on (1) and off (0). All computer data is stored and processed in binary.

What is hexadecimal used for?

Hexadecimal (base 16) is a compact way to represent binary data. Each hex digit represents exactly 4 binary digits. It is used for colors (#FF0000), memory addresses, and more.

How do I convert decimal to binary?

Divide by 2 repeatedly and record the remainders. Read the remainders from bottom to top. For example: 13 = 1101₂.

Assumptions & Limitations

  • Assumes valid digits for the selected base (e.g., only 0 and 1 for binary).
  • Assumes non-negative integer input.
  • Division produces integer quotient and remainder only.