Binary Calculator guide
Binary Calculator: Binary Arithmetic and Conversions
Use our binary calculator to add, subtract, multiply and divide binary numbers, do bitwise AND, OR and XOR, and convert between binary, decimal, hex and octal.
By the AllCalculator editorial teamUpdated 15 October 20262 min read
Computers store everything as binary: ones and zeros. Our Binary Calculator does arithmetic and bitwise operations in binary, octal, decimal or hexadecimal, and converts between them all.
How to use the calculator (Binary Calculator)
- Choose what you want to do: convert, add, subtract, multiply, divide or a bitwise operation.
- Choose the base your numbers are in.
- Enter the numbers.
Every answer is shown in binary, decimal, hexadecimal and octal.
How binary works
Each binary digit (bit) is worth double the one to its right: 1, 2, 4, 8, 16 and so on. So 101101 is 32 + 8 + 4 + 1 = 45 in decimal.
Binary addition
Add column by column from the right, carrying 1 when you get 2:
- 0 + 0 = 0
- 1 + 0 = 1
- 1 + 1 = 10 (write 0, carry 1)
With the calculator's default numbers, 101101 + 1101 is 45 + 13 = 58, which is 111010 in binary.
Bitwise operations
- AND: 1 only where both bits are 1.
- OR: 1 where either bit is 1.
- XOR: 1 where the bits are different.
- Shift left by n: multiplies by 2ⁿ. Shift right: divides by 2ⁿ, rounding down.
Hexadecimal
Hex uses 16 digits, 0 to 9 and A to F. Each hex digit is exactly four bits, which is why hex is a compact way to write binary: 1111 1111 is FF, or 255.
For IP addresses and network masks, try our Subnet Calculator, and for general maths our Scientific Calculator.
Frequently asked questions
How do I convert binary to decimal?
Add up the place values of every 1. For 1011, that's 8 + 2 + 1 = 11.
How are negative numbers shown?
With a minus sign. Computers often use two's complement instead, which depends on the number of bits.
Is there a size limit?
No. The calculator works with whole numbers of any size.
Binary is the language of computers. Use the Binary Calculator for homework, coding and networking.
Sources and further reading
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.