Numbers in base 2
Binary is the number system computers use. It has only two digits, 0 and 1, and each place is worth twice the one to its right: 1, 2, 4, 8, 16 and so on.
This calculator adds, subtracts, multiplies and divides binary numbers and applies the bitwise operations AND, OR and XOR. The answer is shown in binary and also in octal, decimal and hexadecimal so you can check your understanding.
How it is calculated
Worked example
1011 + 110
- In decimal
- 11 + 6 = 17
- Result in binary
- 10001
- Result in hex
- 11
Bitwise operations
| Operation | Rule | 1100 and 1010 |
|---|---|---|
| AND | 1 only if both bits are 1 | 1000 |
| OR | 1 if either bit is 1 | 1110 |
| XOR | 1 if the bits differ | 110 |
Why computers use binary
A transistor is easiest to build with two reliable states — on and off — so every number, letter and instruction inside a computer is ultimately binary. A single binary digit is a bit; eight of them make a byte, the basic unit computers use to store one character of text.

