Binary Calculator (Add, Subtract, Multiply, Divide)

Add, subtract, multiply and divide binary numbers with decimal and hex results and a remainder for division. Example: with first binary number 1011, second binary number 110, operation Add, the result is Result (binary) = 10001; Result (decimal) = 17; Result (hex) = 11.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

How do you use the Binary Calculator (Add, Subtract, Multiply, Divide)?

Enter two binary numbers, pick an operation and read the result in binary, decimal and hexadecimal. For division, the calculator also gives the remainder. Negative results are shown with a minus sign, and very long inputs are supported because the arithmetic is exact.

The Step-by-Step Solution box converts both numbers to decimal, performs the operation, and converts the answer back, so you can verify each stage. A reminder of the binary addition rules is included at the end for hand calculations.

What formula does the Binary Calculator (Add, Subtract, Multiply, Divide) use?

Binary addition follows four rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 and 1 + 1 = 10, which means write 0 and carry 1. Subtraction borrows in the same way as decimal subtraction. Multiplication is simplest of all: the partial products are either 0 or a shifted copy of the first number, which you then add.

Division is long division with only two possible quotient digits, 0 or 1, at each step. The quotient is rounded toward zero and the remainder is the amount left over, so that dividend = quotient × divisor + remainder always holds.

Worked example: 1011 + 110

In decimal, 1011₂ is 11 and 110₂ is 6, so the sum is 17, which is 10001₂. By hand in columns: the rightmost column is 1 + 0 = 1; the next is 1 + 1 = 10, so write 0 and carry 1; the next is 0 + 1 + carry 1 = 10, write 0 and carry 1; then 1 + carry 1 = 10, giving 10001. Multiplying the same pair gives 1000010 (66), and dividing gives a quotient of 1 with remainder 101 (5).

Why binary arithmetic is worth practising

Binary arithmetic is the foundation of how processors compute. An adder circuit is built from simple logic gates that implement exactly the carry rules above. Students of computer science, electronics and networking practise it to understand overflow, carry flags and bitwise operations.

It also helps with everyday programming tasks: checking an address calculation, working out a mask, or debugging an integer that has wrapped. The calculator lets you check your hand working instantly and see the decimal meaning of every result.

What are the most common mistakes with the Binary Calculator (Add, Subtract, Multiply, Divide)?

  • Treating 1 + 1 as 2 instead of writing 0 and carrying 1.
  • Forgetting a carry that ripples through several columns.
  • Entering digits other than 0 and 1.
  • Expecting fractional results from division. This calculator returns an integer quotient and a remainder.

What Is the Tested Example for the Default Values?

This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.

Input: First binary number1011
Input: Second binary number110
Input: OperationAdd
Result (binary)10001
Result (decimal)17
Result (hex)11

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

How do you add binary numbers?

Add column by column from the right. 1 + 1 gives 0 with a carry of 1 into the next column, and 1 + 1 + 1 gives 1 with a carry of 1.

How do you multiply binary numbers?

Multiply the top number by each bit of the bottom number, shifting left for each position, then add the partial products.

What happens when I divide binary numbers?

The calculator returns an integer quotient and a remainder, so that quotient × divisor + remainder equals the dividend.