Binary Calculator
Do arithmetic and bitwise operations on base-2 numbers.
How to use the Binary Calculator
- Enter the first binary number.
- Choose the operation.
- Enter the second binary number.
- Press Calculate. The result updates automatically as you type.
About the Binary Calculator
Computers store every number as a pattern of bits, so binary arithmetic is the foundation of programming, digital electronics and networking. Each place in a binary number is a power of two: 1011₂ means 8 + 0 + 2 + 1 = 11.
Arithmetic works just as it does in base 10, except that you carry whenever a column reaches 2 instead of 10. Bitwise AND, OR and XOR are used constantly for masks, flags, permissions and subnet calculations. Division here is integer division, giving a quotient and a remainder. Negative results are shown with a minus sign rather than in two's-complement form.
Formula
Binary addition follows four rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 and 1 + 1 = 10 (write 0, carry 1).
1011₂ + 110₂ = 10001₂ (11 + 6 = 17)
Bitwise operations compare digits column by column: AND gives 1 only if both bits are 1, OR if either is 1, and XOR if exactly one is 1.
Example calculation
Using the default values:
- First binary number = 1011
- Operation = Add (+)
- Second binary number = 110
the calculator returns:
- Result (binary): 10001
- Result (decimal): 17
- Result (hex): 11
- In decimal: 11 + 6 = 17
Frequently asked questions
How do you add binary numbers?
Add column by column from the right. 1 + 1 = 10, so write 0 and carry 1 to the next column, exactly as you carry 10 in decimal.
What is 1011 in decimal?
1×8 + 0×4 + 1×2 + 1×1 = 11.
What does XOR do?
It outputs 1 in each position where the two bits differ and 0 where they match. 1011 XOR 0110 = 1101.
Last updated: · Category: Math calculators