Binary Addition Calculator

Add binary numbers step by step. See carries and column addition. Perfect for computer science and digital logic.

Input Form -->
Enter only 0s and 1s (no spaces or commas).
Enter only 0s and 1s.
1010 + 1101
1111 + 1
101 + 101
110011 + 101101
111 + 111
101010 + 10101
Calculating...

Understanding Binary Addition

Binary addition is the arithmetic of base‑2 numbers and the fundamental operation inside every digital computer. It works similarly to decimal addition, but with only two digits: 0 and 1.

? Basic Rules (Single‑Bit Addition)

A B Sum (A+B) Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

When a carry from a previous column is included, we have three bits to add: A, B and Carry‑in. The result then follows the extended truth table (shown earlier in the FAQ).

? Step‑by‑Step Example (with carries)

Let's add 1101 (13 decimal) and 1011 (11 decimal). Align the numbers to the right (least significant bit) and work column by column from right to left:

   (carry) 1 1 1 0 0
           1 1 0 1
         + 1 0 1 1
         ----------
           1 1 0 0 0   (24 decimal)
                        
  1. Column 0 (LSB): 1 + 1 = 0, carry 1 → next column.
  2. Column 1: 0 + 1 + carry 1 = 0, carry 1.
  3. Column 2: 1 + 0 + carry 1 = 0, carry 1.
  4. Column 3: 1 + 1 + carry 1 = 1, carry 1.
  5. Final carry becomes the most significant bit: 1.

⚙️ Why Carries Are Essential

Carry propagation is what allows addition of multi‑bit numbers. In digital circuits, this is implemented by half‑adders (for the least significant bit) and full‑adders (for the remaining bits).

Half Adder
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Adds two bits, produces sum and carry.

Full Adder
A B Cin Sum Cout
0 0 0 0 0
0 1 0 1 0
1 1 0 0 1
1 1 1 1 1

Adds three bits (two inputs + carry‑in).

By chaining full‑adders, we can add binary numbers of any length – exactly what your computer's ALU does.

⚠️ Overflow – When the Result Doesn't Fit

If we are working with a fixed number of bits (e.g., 4‑bit registers), and the sum produces an extra carry beyond the most significant bit, an overflow occurs. For example, adding 1001 (9) and 0111 (7) gives 10000 (16), which requires 5 bits. In a 4‑bit system, the result would be truncated to 0000 and the overflow flag is set – this indicates that the signed interpretation might be wrong. Our calculator shows the full result without truncation, but you can observe the extra carry in the column display.

? Real‑World Applications

  • CPU Arithmetic Logic Unit (ALU): Performs binary addition for all integer operations.
  • Digital Counters: Increment binary values (e.g., program counters).
  • Address Calculation: Adding offsets to memory addresses.
  • Networking: IP checksums and subnet calculations.

Calculator Features (verified):

  • ✅ Validates input (only 0/1 allowed).
  • ✅ Shows carries above each column.
  • ✅ Handles numbers of arbitrary length.
  • ✅ Displays decimal equivalents for verification.
  • ✅ Step‑by‑step column layout (rightmost LSB).

Frequently Asked Questions

When the sum of two bits (plus any incoming carry) equals or exceeds 2, we place a 0 or 1 in the current column and "carry" a 1 to the next higher column. This is similar to carrying over in decimal addition when a sum reaches 10.

The calculator automatically pads the shorter number with leading zeros so that both numbers have the same length for column addition.

That's perfectly normal – it just means a final carry was generated. The calculator displays the complete result. In fixed‑width computing, this extra bit would indicate an overflow condition.