Category

Binary Calculator - Add, Subtract, Multiply & Divide Binary Numbers with Steps

Perform binary addition, subtraction, multiplication, and division with step-by-step solutions. Supports signed and unsigned representation (8, 16, 32-bit two's complement).

0 calculations

Calculation Parameters

= 10 decimal
= 6 decimal

Enter Parameters

Fill in the form on the left and click "Calculate"

What are Arithmetic Binary Operations?

Binary numbers are numbers of base 2, consisting only of the digits 0 and 1. They are a string of bits that can represent only two logic states: on or off. Since we are taught arithmetic operations based on the decimal system, binary arithmetic can seem difficult at first — but it follows the same logic with just two digits.

Our binary calculator makes performing binary addition, subtraction, multiplication, and division easy. It executes all calculations in both signed and unsigned representation, showing step-by-step solutions.

Binary Addition

Binary addition works in a very similar way to decimal addition. There are 4 main rules:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (write 0, carry 1 to the next bit)

Applying those rules from the rightmost (least significant) bit, you can add binary numbers just like decimal ones — using a carry when the sum exceeds 1.

Example: 1010 + 0110
Bit by bit from right: 0+0=0, 1+1=10 (write 0, carry 1), 0+1+1=10 (write 0, carry 1), 1+0+1=10 (write 0, carry 1) → carry produces a new bit.
Result: 10000 = 16 in decimal. ✓ (10 + 6 = 16)

Binary Subtraction

Binary subtraction uses the borrow method, equivalent to decimal subtraction. The rules are:

  • 0 − 0 = 0
  • 1 − 0 = 1
  • 1 − 1 = 0
  • 0 − 1 = 1 (borrow 1 from the next bit)

Alternatively, the complement method replaces the subtrahend by its two's complement and then executes binary addition. Our calculator shows the borrow method with a step-by-step table.

Example: 1111 − 0011
Bit by bit: 1−1=0, 1−1=0, 1−0=1, 1−0=1 → Result: 1100 = 12 in decimal. ✓ (15 − 3 = 12)

Binary Multiplication

Binary multiplication is very similar to decimal long multiplication, but simpler since we only work with 0 and 1. The four rules are:

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

You multiply the multiplicand by each bit of the multiplier, shift left according to bit position, then add the partial products together.

Example: 1011 × 1010
Partial products: 1011×0=0, 1011×1 shifted 1 = 10110, 1011×0 shifted 2 = 0, 1011×1 shifted 3 = 1011000.
Sum: 0 + 10110 + 0 + 1011000 = 1101110 = 110 in decimal. ✓ (11 × 10 = 110)

Binary Division

Binary division follows the same long division algorithm as decimal division, but with only two possible quotient digits (0 or 1):

  • If the current partial dividend is ≥ divisor: write 1 in the quotient, subtract divisor
  • If the current partial dividend is < divisor: write 0 in the quotient

Example: 11010 ÷ 101
26 ÷ 5 = 5 remainder 1. Binary: 11010 ÷ 101 = 101 remainder 1. ✓

Signed vs Unsigned Representation

Binary numbers can be interpreted as unsigned (always positive) or signed using two's complement:

  • Unsigned: all bits represent the magnitude. An 8-bit number ranges from 0 to 255.
  • Signed 8-bit: the most significant bit (MSB) is the sign bit. Range: −128 to +127.
  • Signed 16-bit: range −32 768 to +32 767.
  • Signed 32-bit: range −2 147 483 648 to +2 147 483 647.

To convert a positive integer to its negative two's complement: flip all bits, then add 1. For example, +5 in 8-bit is 00000101; −5 is 11111011.

How to Use the Binary Calculator

  1. Select the operation: Addition (+), Subtraction (−), Multiplication (×), or Division (÷).
  2. Enter Binary Number A — a string of 0s and 1s (up to 32 bits). The decimal equivalent is shown instantly below the field.
  3. Enter Binary Number B in the same format.
  4. Choose the representation: Unsigned, Signed 8-bit, 16-bit, or 32-bit.
  5. Click Calculate to see the binary result, decimal verification, and a full step-by-step table.
  6. Use the quick example buttons to load pre-filled problems instantly.

Frequently Asked Questions

What is the maximum number of bits supported?
The calculator supports binary numbers up to 32 bits for each operand.
Can I divide by zero?
No — division by zero is undefined and the calculator will show an error message.
What happens when subtraction gives a negative result?
The calculator shows the magnitude in binary with a minus sign (e.g., −0011). In signed representation, it shows the two's complement value.
How is carry handled in addition?
When two bits and a carry-in sum to 2 or 3, a carry-out bit is propagated to the next higher bit position. The step-by-step carry table shows each bit position.
What is two's complement?
Two's complement is the most common method for representing negative binary integers. A number and its two's complement sum to zero (mod 2ⁿ). It allows hardware to use the same circuit for addition and subtraction.

Calculation History

Loading...