Skip to content
CalculatorAtlas

Binary Calculator

Tested

Add, subtract, multiply, divide or apply bitwise operations to binary numbers.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Binary arithmetic works like decimal with only the digits 0 and 1. 1011 (11) + 110 (6) = 10001 (17). The calculator adds, subtracts, multiplies and divides binary numbers and shows the decimal result.

Enter two binary numbers and choose an operation. The calculator returns the result in binary and decimal.

Related tools: Binary to Text Converter: Decode groups of 8 bits as UTF-8 text. Hex Calculator: Add, subtract or multiply hexadecimal numbers. Hex to Text Converter: Decode hexadecimal bytes as UTF-8 text.

How to use the Binary Calculator

  1. Type first binary number.
  2. Type second binary number.
  3. Choose operation: Add, Subtract, Multiply, Divide (integer), AND and OR and 1 more.
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Binary Calculator
InputWhat to enterAllowed values
First binary numberText—
Second binary numberText—
OperationChoose one: Add; Subtract; Multiply; Divide (integer); AND; OR; XORStarts at Add

Formula and method

Formula

binary arithmetic and bitwise operations

IEEE-754 double precision; shown to the decimals indicated.

Arbitrary-size integers; division returns the integer quotient. Bitwise operations are for non-negative numbers.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: First binary number = 1011; Second binary number = 110; Operation = Add.

Results of example 1
ResultValue
Result10001
Decimal17

Example 2

Inputs: First binary number = 1111; Second binary number = 101; Operation = Subtract.

Results of example 2
ResultValue
Result1010
Decimal10

Example 3

Inputs: First binary number = 101; Second binary number = 11; Operation = Multiply.

Results of example 3
ResultValue
Result1111
Decimal15

The first line is the headline result (result). Below it the binary Calculator lists decimal, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.

Adding by hand

Add from the right, carrying when a column reaches 2: 1011 + 0110. Column by column: 1+0 = 1, 1+1 = 10 (write 0, carry 1), 0+1+1 = 10 (write 0, carry 1), 1+0+1 = 10 (write 0, carry 1), and the final carry gives 10001.

Bitwise operations

The calculator also supports bitwise operations such as AND, OR and XOR, which compare numbers bit by bit. Division returns the integer quotient, and division by zero is rejected. Bitwise operations are for non-negative numbers.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • First binary number: entering "102" shows "“2” is not a base-2 digit." beside that field and no result.
  • Second binary number: entering "0" shows "Cannot divide by zero." beside that field and no result.

Choosing between the Binary Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Binary Calculator and similar calculators
CalculatorYou enterIt returns
[Binary to Text Converter](/technology/binary-to-text/)binary bytesText
[Hex Calculator](/technology/hex-calculator/)first hex number, second hex number and operationResult
[Hex to Text Converter](/technology/hex-to-text/)hex bytesText
[Two's Complement Calculator](/technology/twos-complement/)bit width and decimal integerBinary
[Number Base Converter](/technology/base-calculator/)number, from base and to baseResult

Background: number systems

To convert a whole number from decimal to another base, divide repeatedly by the base and read the remainders backwards; to convert to decimal, multiply each digit by the base raised to its position (counting from 0 at the right) and add. Each hexadecimal digit equals exactly four bits and each octal digit three, so binary converts to hex by grouping bits in fours from the right.

255 in decimal is 11111111 in binary and FF in hexadecimal.

Assumptions and limitations

  • Division by zero is rejected

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for first binary number and second binary number to confirm this.

Frequently asked questions

How do I convert binary to decimal?

Add the powers of two for each 1: 10001 = 16 + 1 = 17.

Why do computers use binary?

Two states are easy to represent in electronics.

Does it handle negative numbers?

Bitwise operations need non-negative numbers; for two's complement use the dedicated calculator.

What does the Binary Calculator calculate?

Add, subtract, multiply, divide or apply bitwise operations to binary numbers. It returns Result and Decimal.

What formula does the Binary Calculator use?

binary arithmetic and bitwise operations. Arbitrary-size integers; division returns the integer quotient.

What do I need to enter in the binary Calculator?

You enter First binary number, Second binary number and Operation.

How is the result rounded or limited?

IEEE-754 double precision; shown to the decimals indicated. Division by zero is rejected.

What does the “Operation” option change?

It sets how the binary is worked out. The choices are Add, Subtract, Multiply, Divide (integer), AND, OR and XOR.

What is an example of a binary result?

With first binary number 1011, second binary number 110 and operation Add, the result is 10001.

Where does the method come from?

The method follows: Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion.

Sources

  • Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.