Binary Addition Calculator

Add two binary numbers and see every carry, column by column.

Updated

Enter to calculate Esc to clear

Binary Addition Calculator

Our Binary Addition Calculator adds two binary numbers and shows the sum in binary, decimal and hexadecimal. It lays out the column addition with every carry marked, so you can check homework step by step, and it tells you whether the sum fits in the bit width you choose or overflows.

Quick answer

Add binary numbers column by column from the right, using 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1) and 1 + 1 + 1 = 11 (write 1, carry 1). For example, 1100 + 1010 = 10110, which is 12 + 10 = 22 in decimal. Enter any two binary numbers above and the calculator shows the sum and every carry instantly.

  • Carrying: a column that adds up to 2 or 3 writes 0 or 1 and carries 1 to the left
  • Overflow: in 8 bits, 1111 1111 + 1 = 1 0000 0000 needs 9 bits, so the register keeps 0000 0000
  • In hardware: sum bit = A XOR B, carry = A AND B (a half adder)
  • Check it: convert to decimal, or subtract one addend from the sum

Binary Addition Rules

Binary has only two digits, so a single column can only add up to 0, 1, 2 or 3 (two bits plus a carry). That gives five rules:

ColumnTotalWriteCarry
0 + 0000
0 + 1110
1 + 0110
1 + 110 (2)01
1 + 1 + 111 (3)11

Carrying in Binary

Work from the rightmost column to the left. Whenever a column adds up to 2 or more, write the last binary digit and carry 1 into the next column, just as 7 + 5 = 12 in decimal makes you write 2 and carry 1.

Carry 1 1 1 1
1 0 1 1 (11)
+ 0 1 1 1 (7)
---------
1 0 0 1 0 (18)

Here the right column is 1 + 1 = 10, so write 0 and carry 1. Each of the next three columns then adds up to 2 or 3 and passes a carry on, and the last carry becomes a new leftmost digit: 1011 + 111 = 10010, or 11 + 7 = 18.

Example Calculations

BinaryDecimalCarries
1100 + 1010 = 1011012 + 10 = 221
1011 + 111 = 1001011 + 7 = 184
1111 + 1 = 1000015 + 1 = 164
101101 + 11011 = 100100045 + 27 = 726
1100 + 11 = 111112 + 3 = 150

Overflow

Computers store numbers in a fixed number of bits. If a sum needs one more bit than the register has, the final carry has nowhere to go and is lost: that is unsigned overflow. In 8 bits, 1111 1111 + 0000 0001 = 1 0000 0000 (255 + 1 = 256), but the register keeps only 0000 0000, so the stored answer is 0. The calculator shows the true sum, the wrapped result and an overflow flag for the bit width you pick.

Signed numbers can overflow too. In 8-bit two’s complement, 0111 1111 + 1 = 1000 0000, so 127 + 1 comes out as −128. Signed overflow happens when two numbers with the same sign bit give a sum with the opposite sign bit.

How Computers Add

CircuitInputsSum bitCarry out
Half adderA, BA XOR BA AND B
Full adderA, B, carry inA XOR B XOR Cin(A AND B) OR (Cin AND (A XOR B))

A ripple-carry adder chains one full adder per bit, each passing its carry to the next, which is exactly the column method above done in hardware. Subtraction reuses the same circuit by adding the two’s complement; see the Binary Subtraction Calculator.

Key Terms

Addend
Each of the numbers being added.
Sum
The result of the addition.
Carry
The 1 passed to the next column on the left when a column adds up to 2 or more.
Bit width
How many bits the register holding the result has, such as 8, 16, 32 or 64.
Overflow
When the sum does not fit in the bit width and the top carry is lost.

How to Use the Binary Addition Calculator

  1. Enter the first number. Type the first binary number in the “Addend A (binary)” box, for example 1100. Spaces, underscores and a 0b prefix are ignored. Pressing Enter moves you to the next box.
  2. Enter the second number. Type the second binary number in the “Addend B (binary)” box, for example 1010.
  3. Set the bit width. Use the 8, 16, 32 or 64 chips, or type any width from 1 to 64. The width is the size of the register the sum has to fit in, and decides whether the addition overflows.
  4. Read the sum. The sum appears as soon as both numbers are filled, with the working in decimal underneath (for example 1100 + 1010 = 10110, 12 + 10 = 22). Below it, the column addition shows every carry, and a table gives the sum in binary, decimal and hexadecimal, the result wrapped to the bit width and whether it overflowed.
  5. Copy the result. Press Copy to copy the binary sum. Press Clear or Esc to start again.

Example: enter 11111111 and 1 with an 8-bit width and the sum is 100000000 (255 + 1 = 256), with eight carries and an overflow warning.

Who Can Use This Calculator?

StudentsChecking computer science and digital logic homework step by step
TeachersShowing carrying and overflow in class
ProgrammersVerifying binary sums and overflow in low-level code
Electronics HobbyistsChecking adder circuits and register values

Frequently Asked Questions (FAQs)

How do you add binary numbers?

Line the numbers up on the right and add column by column, starting from the right, just like decimal addition. Use the rules 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1) and 1 + 1 + 1 = 11 (write 1, carry 1). For example, 1100 + 1010 = 10110, which is 12 + 10 = 22.

What is 1 + 1 in binary?

1 + 1 = 10 in binary, which is 2 in decimal. In column addition you write 0 and carry 1 to the next column on the left, the same way 5 + 5 = 10 in decimal makes you write 0 and carry 1.

What is 1 + 1 + 1 in binary?

1 + 1 + 1 = 11 in binary (3 in decimal). This happens when a column has two 1s plus a carry from the right: write 1 and carry 1 to the next column.

What is overflow in binary addition?

Overflow happens when the sum needs more bits than the register holds. In 8 bits, 1111 1111 + 1 = 1 0000 0000 (255 + 1 = 256) needs 9 bits, so the top carry is lost and the register keeps 0000 0000. The calculator shows the true sum, the wrapped result and whether it overflowed.

What is signed overflow?

With signed (two’s complement) numbers, overflow means the sign comes out wrong. In 8 bits, 0111 1111 + 1 = 1000 0000, so 127 + 1 reads as −128. The rule: if both numbers have the same sign bit and the sum has a different one, the result has overflowed. That can happen even when there is no carry out of the top bit.

How does a computer add binary numbers?

With adder circuits built from logic gates. A half adder adds two bits: the sum bit is A XOR B and the carry is A AND B. A full adder also takes a carry in, and chaining one full adder per bit gives a ripple-carry adder that adds whole numbers, passing each carry to the next bit.

How do you add more than two binary numbers?

Either add them two at a time, or add a whole column at once and carry more than one place: four 1s in a column make 100, so you write 0 and carry 10 (a 1 two columns to the left). Adding two at a time is easier to check, and you can use this calculator for each step.

How do you check a binary addition?

Convert to decimal: 1100 = 12, 1010 = 10, and 12 + 10 = 22 = 10110 in binary. Or subtract one addend from the sum and check you get the other, for example with the Binary Subtraction Calculator: 10110 − 1010 = 1100.

Is the Binary Addition Calculator free?

Yes. It is completely free, needs no sign-up, and can be used as many times as you like.

Try our Binary Addition Calculator to add any two binary numbers instantly.