%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Binary Addition Calculator (with carries and overflow check)

Results update as you type.

Your numbers

Understanding the binary addition calculator — concept and principle

This calculator adds two binary numbers column by column, shows the carry produced by every column and, for a fixed register width, checks for unsigned and signed (two's complement) overflow. It is a handy companion for computer science courses, digital electronics and low-level programming.

Binary addition with carriesAdding two bytescarry1111111010110110+01111011=1001100011821233058-bit: 00110001unsigned overflowSigned: −74 + 123 = 49, no signed overflow
The red ninth bit does not fit in 8 bits, so the stored result wraps to 49.

How it is calculated

Column rules: 0 + 0 = 0; 0 + 1 = 1; 1 + 1 = 0 carry 1; 1 + 1 + 1 = 1 carry 1

Sum = A + B, shown in binary, decimal and hexadecimal

Kept result = the lowest w bits of the sum for a w-bit register

Unsigned overflow: a carry out of the leftmost column

Signed overflow: both inputs have the same sign bit and the kept result has the opposite sign

The principle

Binary addition follows exactly the same idea as decimal addition, but each column can hold only 0 or 1, so 1 + 1 makes 10: write 0 and carry 1. A real processor has registers with a fixed number of bits. If the true sum needs one more bit, that bit is lost, which is unsigned overflow. In two's complement, the leftmost bit means negative, so the same bits can also be read as signed numbers. A carry out of the top bit is then normal, but adding two positives that give a negative, or two negatives that give a positive, means the result does not fit: signed overflow.

Worked example

Default inputs: 1011 0110 + 0111 1011, 8-bit register.

  1. In decimal: 182 + 123 = 305.
  2. Adding column by column gives the carries 11111110, a total of 7 carries.
  3. Full sum = 100110001 (decimal 305, hexadecimal 131).
  4. Kept in 8 bits: 00110001; the carry out of the top bit is lost, so unsigned overflow occurs.
  5. As signed numbers: −74 + 123 = 49; the inputs have different signs, so no signed overflow.

How to read the result

Whether an overflow matters depends on how you interpret the bits. For unsigned values, 305 does not fit in 8 bits (maximum 255), so the kept value 49 is wrong. For signed values, −74 + 123 = 49 is correct and fits. Processors set separate flags, usually called carry and overflow, to report these two situations.

Common mistakes

Keep in mind: This calculator models plain binary addition. Specific processors and languages may define overflow behaviour differently, for example with saturation or exceptions.

Frequently asked questions

What is 1 + 1 in binary?

10: write 0 and carry 1 to the next column.

What is the difference between carry and overflow?

Carry signals unsigned overflow; the overflow flag signals that a signed result is out of range.

How do I read a negative number in two's complement?

If the top bit is 1, subtract 2^width from its unsigned value; 1011 0110 is 182 − 256 = −74.

Can I add numbers of different lengths?

Yes; the shorter one is padded with leading zeros.

Sources: D. Tarnoff, Computer Organization and Design Fundamentals (East Tennessee State University), Chapter 3 "Binary Math and Signed Representations"

Checked 9 Nov 2026. D. Tarnoff, Computer Organization and Design Fundamentals (East Tennessee State University), Chapter 3 “Binary Math and Signed Representations”, §3.1 binary addition and §3.9 unsigned and two’s complement overflow.

💻 All tech & IT tools →🌍 Calculators by country →