About this calculator
Very long numbers are handled exactly.
How to use it
- Enter the first binary number.
- Choose the operation.
- Enter the second number.
The formula
- AND, OR, XOR
- bitwise operations
Worked example
1011 + 110
- 1011 is 11 and 110 is 6.
- 11 + 6 = 17 = 10001 in binary.
What the result means
Division gives the whole-number quotient and the remainder.
Binary, hex and octal for 0 to 15
Four binary digits cover 0 to 15, which is one hex digit. Learn this table and most conversions become look-ups.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 8 | 10 |
| 9 | 1001 | 9 | 11 |
| 10 | 1010 | A | 12 |
| 11 | 1011 | B | 13 |
| 12 | 1100 | C | 14 |
| 13 | 1101 | D | 15 |
| 14 | 1110 | E | 16 |
| 15 | 1111 | F | 17 |
More worked examples
- Multiplication: 1011 × 110 = 100 0010, which is 11 × 6 = 66, or 42 in hex. Binary multiplication is shift and add: 1011 shifted once plus 1011 shifted twice.
- Subtraction with a borrow: 10001 − 110 = 1011, that is 17 − 6 = 11.
- Masking with AND: 10110110 AND 00001111 keeps only the lowest four bits and gives 110, which is 6. The leading zeros of 0110 are dropped in the answer.
- Flipping bits with XOR: 11001010 XOR 11111111 = 11 0101, which is 53. XOR with all 1s inverts every bit.
Where people go wrong
- Subtracting a larger number gives a negative answer with a minus sign: 110 − 1011 = −101 (−5). It is not shown in two’s complement.
- AND, OR and XOR work bit by bit, so line the numbers up from the right.
Assumptions
- Non-negative inputs for bitwise operations.
Limitations
- Two’s complement is not shown.
Frequently asked questions
How do I add binary numbers?
Add column by column; 1 + 1 = 10, so write 0 and carry 1.
What is 1011 in decimal?
11.
What does XOR do?
Gives 1 where the bits differ.
What is 1 + 1 in binary?
10, which is 2 in decimal. You write 0 and carry 1 to the next column.
What is 255 in binary?
1111 1111, eight 1s. It is the largest number that fits in one byte.
How do I subtract binary numbers?
Work from the right. When you take 1 from 0, borrow from the next column, so the 0 becomes 10 (two) and 10 − 1 = 1.
Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.

