- Home
- Conversion
- Binary Calculator
Binary Calculator
Binary uses only 0 and 1, and each place is worth twice the one to its right. 1011 + 110 = 10001 (11 + 6 = 17 in decimal).
No size limit: add two 200-bit numbers or convert a 64-bit hex address exactly, with every result shown in binary, decimal, hex and octal at once.
Calculate with two binary numbers
Convert between number bases
Signed binary for a decimal number (or back)
Type a decimal like −5, or a binary pattern like 11111011 to read it as a signed number.
How we got this
Compare options
Row 1 follows the calculator above. Edit any cell.Bulk mode
My saved calculations
Stored only in this browser. Nothing is sent to our servers.Country & format
Change the country edition from the menu at the top.Your next step
Your answer carries over, so you don’t have to type it again.
How binary works
Each binary digit (bit) is a power of 2. 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11.
| Bit position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Binary addition rules
| Sum | Result | Carry |
|---|---|---|
| 0 + 0 | 0 | 0 |
| 0 + 1 | 1 | 0 |
| 1 + 1 | 0 | 1 |
| 1 + 1 + 1 (with carry) | 1 | 1 |
Worked example
1011 + 0110: right to left, 1+0 = 1; 1+1 = 0 carry 1; 0+1+1 = 0 carry 1; 1+0+1 = 0 carry 1; the last carry gives 10001.
Converting decimal to binary
Divide by 2 repeatedly and write down the remainders from bottom to top. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101. For hex, group the bits in fours: 1101 0110 = D6.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 5 | 101 | 5 | 5 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 100 | 1100100 | 64 | 144 |
| 255 | 11111111 | FF | 377 |
Two’s complement (negative numbers)
Computers store negative whole numbers by inverting every bit of the positive value and adding 1. −5 in 8 bits: 5 = 00000101 → invert 11111010 → add 1 → 11111011. An n-bit signed number runs from −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1 (−128 to 127 for 8 bits).
Frequently asked questions
How do I add binary numbers?
Add column by column from the right: 1 + 1 = 0 carry 1, and 1 + 1 + 1 = 1 carry 1.
How do I convert binary to decimal?
Multiply each bit by its power of 2 and add them up. 1101 = 8 + 4 + 0 + 1 = 13.
What is 1 + 1 in binary?
10, which is 2 in decimal.
Why do computers use binary?
Electronic circuits have two reliable states, on and off, which map neatly onto 1 and 0.