Binary calculator
Add, subtract, multiply or divide two binary numbers. See the answer in binary, decimal and hex, and the carries for addition.
Column addition, with carries
| 1 | 1 | 1 | 1 | ||
| 1 | 0 | 1 | 1 | ||
| + | 1 | 1 | 1 | ||
| 1 | 0 | 0 | 1 | 0 |
Work right to left: 0+0 = 0, 1+0 = 1, 1+1 = 10 (write 0, carry 1), 1+1+1 = 11 (write 1, carry 1). Small numbers above the columns are the carries.
Binary arithmetic in brief
Binary follows the same rules as decimal, it just carries at 2 instead of 10. That's all a CPU's adder does: each column is a tiny circuit (a full adder) that takes two bits and a carry and outputs a sum bit and a carry. Chain 64 of them and you can add 64-bit integers.
Multiplication is repeated shifting and adding, and shifting left by one place doubles a number, the same way appending a zero multiplies by ten in decimal. The bitwise calculator lets you try shifts directly, and the binary to decimal converter checks any single value.
Questions people ask
How do you add binary numbers?
Line them up on the right and add column by column: 0+0 = 0, 0+1 = 1, 1+1 = 10 (write 0, carry 1), and 1+1+1 = 11 (write 1, carry 1). The calculator draws the columns and carries for your numbers.
How do you subtract in binary?
Borrow like in decimal: 10 − 1 = 1. Computers instead add the two’s complement of the second number, which turns subtraction into addition.
How does binary multiplication work?
Each row is either a copy of the first number (for a 1) or zeros (for a 0), shifted left one place per row. Add the rows. 101 × 11 = 101 + 1010 = 1111.
Does binary division give a remainder?
Yes. Integer division returns the quotient and the remainder separately, both in binary, with the decimal values shown underneath.
Can I use negative numbers?
Yes, write a leading minus sign. Results are shown with a minus sign rather than as a fixed-width bit pattern; for that, use the two’s complement calculator.