Binary Calculator

Enter two binary numbers, choose an operation, and get an exact result in binary, decimal, and hexadecimal. For base conversions instead of arithmetic, use the Binary Converter; for bit-level AND/OR/XOR/NOT logic, use Bitwise Operations. Starting from plain decimal numbers instead of binary? Convert them first with Decimal to Binary.

Only the digits 0 and 1 are valid. Numbers of any length are supported exactly.

What is a Binary System?

The binary number system is a system of numbers which operates similar to the decimal system. In the decimal number system, the digit 10 is used as its base. However, in the binary system, the number 2 is used as a base. Additionally, in the decimal system, the numbers 0 to 9 are used. In the binary system, only two numbers are used which includes 0 and 1—every number is referred to as a bit. All other computations are done the same way as in the decimal system.

The latest computer technology is based entirely on the binary number system. Binary can be easily executed in the internal wiring and mechanism of computer systems, since hardware only needs to distinguish two states: on or off (1 or 0). This makes binary ideal for digital electronics and computing. For a deeper look at why that two-state design wins out over decimal, see why computers use binary.

This calculator performs addition, subtraction, multiplication, and division on binary numbers using exact BigInt arithmetic, so results stay accurate no matter how long the input is. Enter your binary values, select an operation, and get results in binary, decimal, and hexadecimal, plus the quotient and remainder for division. If you just need the decimal value of a single binary number rather than an operation between two, the Binary to Decimal Converter is the more direct tool.

Binary Conversion Table

Understanding how binary numbers correspond to decimal numbers is fundamental to working with binary calculations. Here's a quick reference table:

Decimal NumbersBinary Numbers
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
1610000
2010100
32100000
641000000

For converting between number systems—including hexadecimal and octal—see the Binary Converter. To encode or decode text as binary, use the Binary Translator instead.

Binary Addition

Binary addition works like decimal addition, but a carry happens as soon as a column reaches 2 instead of 10:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (0 with a carry of 1)
  • 1 + 1 + 1 = 11 (1 with a carry of 1)

Example: 1011 (11) + 1101 (13)

    1 1 1    (carries)
    1 0 1 1
  + 1 1 0 1
  ---------
  1 1 0 0 0  = 24 in decimal

The calculator applies these carry rules for numbers of any length using exact BigInt arithmetic. For a deeper walkthrough of the rules, carrying, and more worked examples, see Binary Addition Explained.

Binary Subtraction

Binary subtraction follows the same borrowing logic as decimal subtraction. A borrow is needed whenever you subtract 1 from 0:

  • 0 - 0 = 0
  • 1 - 0 = 1
  • 1 - 1 = 0
  • 0 - 1 = 1 (with a borrow from the next column)

Example: 1010 (10) − 0110 (6)

    1 0 1 0
  - 0 1 1 0
  ---------
    0 1 0 0  = 4 in decimal

If the second number is larger than the first, the result is negative. This calculator does not represent negative values as binary — it reports the decimal result and points you to the Two's Complement Calculator, which is the standard way computers represent signed binary numbers.

For a deeper walkthrough of the rules and borrowing — including how a borrow ripples across multiple zeros — see Binary Subtraction Explained.

Binary Multiplication

Binary multiplication uses the same long-multiplication method as decimal, but it's simpler because each partial product is either all zeros or a shifted copy of the first number:

  • 0 × 0 = 0
  • 0 × 1 = 0
  • 1 × 0 = 0
  • 1 × 1 = 1

Example: 101 (5) × 11 (3)

      1 0 1
    ×   1 1
    ---------
      1 0 1    (101 × 1)
    1 0 1      (101 × 1, shifted left)
    ---------
    1 1 1 1    = 15 in decimal

The calculator computes this exactly with BigInt arithmetic, so long operands don't lose precision.

Binary Division

Binary division works like decimal long division, using binary subtraction at each step. This calculator returns an integer quotient and, when the division isn't exact, the remainder — it does not produce binary or decimal fractions.

Example: 1111 (15) ÷ 10 (2)

1111 ÷ 10 = 111 remainder 1
(15 ÷ 2 = 7 remainder 1 in decimal)

Dividing by 0 (binary 0) is rejected with an error rather than returning an undefined result.

How to Use This Calculator

  1. Enter the first number: type a binary value using only 0 and 1. If you have an octal value instead — like a chmod permission — convert it first with the Octal to Binary Converter.
  2. Choose an operation: add, subtract, multiply, or divide.
  3. Enter the second number: another binary value.
  4. Click Calculate: see the result in binary, decimal, and hexadecimal. For division, the quotient and remainder are both shown.
  5. Copy or reset: use Copy binary result to copy the answer, or Reset to clear the form.

Input is validated before calculating: only the digits 0 and 1 are accepted, division by zero is blocked, and a subtraction result that would be negative is reported in decimal instead of being shown as invalid binary.

Frequently Asked Questions

What operations does this binary calculator support?

Addition, subtraction, multiplication, and division on two binary (base-2) numbers. It does not perform bitwise AND, OR, XOR, NOT, or shift operations — use the Bitwise Operations tool for those.

Does the calculator show a remainder for division?

Yes. Division returns an integer quotient and, when the divisor doesn't divide evenly, the remainder — both in binary and decimal. The calculator does not produce binary fractions or decimal points.

Can the calculator produce a negative binary result?

No. If subtraction produces a negative value, the calculator reports the decimal value and stops instead of guessing at a signed binary format. Use the Two's Complement Calculator for signed binary representation.

What's the largest binary number this calculator can handle?

There's no practical size limit. The calculator uses JavaScript's BigInt type, so results stay exact even for binary numbers far longer than 53 bits, which is where standard JavaScript numbers start losing precision.

What happens if I enter invalid characters?

The calculator only accepts the digits 0 and 1. Any other character, including letters, spaces inside the number, or digits 2-9, produces a clear validation error instead of being silently stripped out.

How is this different from the Binary Converter?

The Binary Converter changes a value from one format to another, such as binary to hex or text to binary. This calculator performs math between two binary values and returns the result, with decimal and hex shown as supporting information.