Binary Addition Calculator

Enter two binary numbers to add them together.

Result

10001
17
0x11

How it is calculated

Both entries are read as base-2 numbers (only the digits 0 and 1 are accepted), converted to integers, added, and the sum is written back in three bases: sum = A2 + B2. The result is shown in binary, in decimal with thousands separators, and in hexadecimal with a 0x prefix and capital letters.

Leading zeros are ignored, so 0001 equals 1. Each number can have at most 63 digits after the leading zeros, and the sum has to fit in a signed 64-bit integer (largest value 9,223,372,036,854,775,807); anything larger returns no result. Negative numbers, spaces and digits other than 0 and 1 are not accepted.

Worked example

Add 1011 and 110. In decimal, 1011 is 8 + 2 + 1 = 11 and 110 is 4 + 2 = 6. The sum is 11 + 6 = 17. Written in binary, 17 is 16 + 1, which gives 10001. In hexadecimal, 17 is one sixteen and one unit, so the tool shows 0x11. Doing it by hand column by column from the right gives the same answer: 1+0=1, 1+1=0 carry 1, 0+1+1=0 carry 1, 1+1=0 carry 1, and the last carry becomes the leading 1.

Try this example →

Common mistakes

  • Typing a decimal number such as 12 or 255 in a field: any digit other than 0 or 1 makes the tool return no result, so convert to binary first.
  • Reading the binary and hex rows as decimal: 10001 in the binary row is 17, not ten thousand and one, and 0x11 is 17, not eleven.
  • Expecting the sum to keep the width of the inputs: the result has no fixed bit width, so a carry out of the top bit just makes the answer one digit longer instead of wrapping around as it would in an 8-bit register.
  • Entering two's complement negatives such as 11111111 and expecting -1: the tool treats it as the unsigned value 255.
  • Pasting numbers with a 0b prefix or spaces between nibbles: only plain 0 and 1 characters are accepted.

About this calculator

Binary addition follows the same place-value logic as decimal addition, just with only two digits: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), and 1+1+1=11 (write 1, carry 1) when a carry is already in play. Adding two binary numbers means applying this bit by bit from right to left, propagating any carry into the next column.

This calculator adds two binary numbers and shows the sum in binary, decimal, and hexadecimal side by side, which makes it useful for computer science students learning how arithmetic actually happens at the bit level, and for programmers and network engineers double-checking manual binary math when working with bitmasks, checksums, or subnetting.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    If you combine bitmasks, remember that adding is not the same as OR. The two only agree when the numbers share no set bits. Adding 1100 and 0110 gives 10010, which is 0x12, while OR-ing them would give 1110. When the sum is longer than the inputs, an overlap or carry occurred. Do you mostly check masks, checksums or homework with this?

Popular calculators

All Calculators