Browse All Calculators

Binary Calculator

Free binary calculator. Add, subtract, multiply and divide binary, decimal, octal and hex numbers, or use AND, OR and XOR, with steps and a bit view.

100% Free
No Sign-up
Instant Results
Works on Mobile

Binary Calculator

Operation
Show result in
Step-by-step working
  1. Value 1 in decimal: 101001001 in binary = 329.
  2. Value 2 in decimal: 011001000 in binary = 200.
  3. Add the decimal values: 329 + 200 = 529.
  4. In binary the same sum reads 101001001 + 11001000 = 1000010001.
  5. Write the result in binary: 529 = 1000010001.
Binary result
10 0001 0001
= 529 in decimal
Decimal
529
Octal
1021
Hexadecimal
211
Bits needed
10
Rules applied
  • Changing base: each digit is multiplied by a power of the base, and the products are added to get the decimal value.
  • Binary addition: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1) and 1+1+1=11 (write 1, carry 1).
Check your answer
  • The decimal check 329 + 200 = 529 matches the binary answer.
  • Converting back: 10 0001 0001 in binary = 529 in decimal.
  • The result needs 10 bits.
Quick note
Adding these numbers column by column carries a 1 4 times. Each 1 + 1 gives 10 in binary.
Binary Calculator - add, subtract, multiply and divide binary numbers online on HighCalc

Binary Calculator: Add, Subtract, Multiply and Divide in Base 2

This free binary calculator does arithmetic on numbers written with only 0s and 1s. Type two values, pick an operation and the answer appears straight away, along with the working, the same result in decimal, octal and hexadecimal, and a row-by-row picture of the bits. It also handles the bitwise operations AND, OR and XOR that programmers use every day.

Quick answer: 101001001 + 011001000 = 1000010001 in binary, which is 329 + 200 = 529 in decimal.

What Is Binary?

Binary is the number system computers use. It has two digits, 0 and 1, and each place is worth twice the place to its right: 1, 2, 4, 8, 16 and so on. The binary number 101001001 is 256 + 64 + 8 + 1, which makes 329. Everyday decimal counting works the same way with powers of ten instead of powers of two. If you only need to switch between systems, the base buttons convert the number in the box for you.

How Binary Addition and Subtraction Work

Addition is done column by column from the right. 0 + 0 is 0, 0 + 1 is 1, and 1 + 1 is 10, so you write 0 and carry a 1 into the next column. Subtraction follows the same idea in reverse. When a 0 has to take away a 1 you borrow from the next column, which turns the 0 into 10. If Value 2 is larger than Value 1 the answer is negative and is shown with a minus sign.

Binary Multiplication and Division

To multiply, take a copy of the first number for every 1 in the second number, shift each copy left to match its place, and add the copies. Multiplying by 2 just adds a 0 to the end. Division here is whole-number division, so you get a quotient and a remainder. Dividing by 2 moves every bit one place to the right. For decimal fractions or longer expressions you can use the scientific calculator or the math solver.

AND, OR and XOR

Bitwise operations line the two numbers up and compare them bit by bit. AND keeps a 1 only where both numbers have a 1, which is handy for masking out bits. OR gives a 1 where either number has one, which switches bits on. XOR gives a 1 only where the bits differ, so a number XOR itself is always 0. These are common in networking, graphics and low-level code.

OperationBinaryDecimal
Add101001001 + 011001000 = 1000010001329 + 200 = 529
Subtract1100 − 101 = 11112 − 5 = 7
Multiply1011 × 11 = 10000111 × 3 = 33
Divide1101 ÷ 10 = 110 remainder 113 ÷ 2 = 6 remainder 1
AND1100 AND 1010 = 100012 AND 10 = 8
OR1100 OR 1010 = 111012 OR 10 = 14
XOR1100 XOR 1010 = 11012 XOR 10 = 6

Working Across Number Systems

Hexadecimal is popular because one hex digit stands for exactly four bits, so long binary strings become short and readable. Octal does the same with three bits per digit. You can set each value to its own system, for example a hex colour mask against a binary flag, and choose any system for the answer. For related number work see the GCD / LCM calculator, the prime factorization calculator and the radian and degree calculator.

Where Binary Arithmetic Is Used

Every processor adds, shifts and compares binary numbers. Programmers use it to check bit flags, set file permissions, work out subnet masks and debug memory values. Students meet it in computer science courses when learning how integers are stored. A quick check with a calculator saves a lot of slow, error-prone column work on paper.

How to Use This Binary Calculator

1

Enter two values

Type or paste a number in Value 1 and Value 2. Choose Binary, Decimal, Octal or Hex under each box.

2

Pick an operation

Press +, −, ×, ÷, AND, OR or XOR. The answer updates as you type.

3

Choose the result format

Use Show result in to see the answer as binary, decimal, octal or hex.

4

Read the working

Check the steps, the bit view and the other number systems to confirm the answer.

Features

Instant Results
The answer updates as you type
Seven Operations
Add, subtract, multiply, divide, AND, OR, XOR
Four Number Systems
Binary, decimal, octal and hex
Bit View
See the bits of both values and the result
Frequently Asked Questions
Common questions about the Binary Calculator.
What is a binary calculator?
A binary calculator does arithmetic on numbers written in base 2, which uses only the digits 0 and 1. You can add, subtract, multiply and divide, and also apply the bitwise operations AND, OR and XOR. This one also accepts decimal, octal and hexadecimal input and can show the answer in any of the four number systems.
How do I add two binary numbers?
Add them column by column from the right, the same way you add decimal numbers. 0 + 0 = 0, 0 + 1 = 1, and 1 + 1 = 10, which means you write 0 and carry 1 to the next column. For 101001001 and 011001000 the sum is 1000010001, which is 329 + 200 = 529 in decimal.
Can I mix number systems, such as binary and hexadecimal?
Yes. Each value has its own base buttons, so Value 1 can be binary while Value 2 is hexadecimal or decimal. Both are converted to decimal first, the operation is done, and the result is shown in the system you choose under Show result in. Switching a base button also converts the number already in that box.
How does binary division work here?
Division gives a whole-number quotient and a remainder, because binary numbers in this calculator are integers. For example, 1101 ÷ 10 is 13 ÷ 2, which is a quotient of 110 (6) with a remainder of 1. You cannot divide by zero, and the calculator will tell you if Value 2 is 0.
What do AND, OR and XOR do?
These compare two numbers bit by bit. AND gives 1 only where both bits are 1. OR gives 1 where at least one bit is 1. XOR gives 1 where the two bits are different. They are used in programming for masks, flags, permissions and simple checksums. They need values of zero or more.
How large a number can I enter?
Values up to just under 2^128 are accepted, which is about 3.4 × 10^38 or 128 binary digits. That covers every common integer size used in computing, including 8, 16, 32 and 64-bit values. Spaces, underscores and the prefixes 0b, 0o and 0x are ignored, so you can paste numbers straight from code.