Binary Calculator: Add, Subtract, Multiply & Divide Binary Numbers

Performing arithmetic with binary numbers is a core skill in computer science and digital electronics. Our binary calculator simplifies this process, allowing you to add, subtract, multiply, and divide binary numbers instantly, with results shown in both binary and decimal formats.

Perform arithmetic on binary numbers or convert between binary and decimal systems.

How to Use Our Binary Calculator

This tool lets you perform calculations on two binary numbers. Remember, the binary system only uses two digits: 0 and 1.

  1. Enter the First Binary Number: In the first input field, type the first binary number (e.g., 1011).

  2. Select the Operation: Choose the mathematical operation you wish to perform: Addition (), Subtraction (), Multiplication (), or Division ().

  3. Enter the Second Binary Number: In the second input field, type the second binary number (e.g., 101).

  4. Calculate: Click the “Calculate” button to see the result.


Understanding Your Results

Our calculator provides the answer to your problem in two formats for complete clarity:

  • Binary Result: The solution is shown in its proper binary form.

  • Decimal Result: The binary answer is also converted to its equivalent in the decimal (base-10) system that we use every day.

Binary arithmetic follows specific rules that are different from the decimal system we’re used to. Understanding these rules helps demystify how computers perform calculations.

How Binary Addition Works

Binary addition is based on four simple rules:

  • , carry over a 1 to the next column.

Example: Let’s add 1011 (decimal 11) and 101 (decimal 5).

  1 1 1   (carry)
  1 0 1 1
+ 0 1 0 1
---------
1 0 0 0 0 

Starting from the right:

  1. 1 + 1 = 0, carry 1.

  2. 1 (carry) + 1 + 0 = 0, carry 1.

  3. 1 (carry) + 0 + 1 = 0, carry 1.

  4. 1 (carry) + 1 + 0 = 0, carry 1.

  5. Bring down the final carry.

The result is 10000 in binary, which is 16 in decimal (11 + 5 = 16).

How Binary Subtraction Works

Subtraction also has its own rules, including the concept of “borrowing.”

  • , with a borrow from the next column.

Example: Let’s subtract 101 (5) from 1110 (14).

      0 10  (borrow)
  1 1 1 0
- 0 1 0 1
---------
  1 0 0 1

The result is 1001, which is 9 in decimal (14 - 5 = 9).

How Binary Multiplication and Division Work

  • Multiplication: This is very similar to decimal long multiplication, but it’s easier because you are only ever multiplying by 0 or 1.

  • Division: This follows the same long division process as in the decimal system. You see if the divisor “fits” into a part of the dividend. If it does, you put a 1 in the quotient; if not, you put a 0.

How Binary to Decimal Conversion Works

Every digit in a binary number has a place value that is a power of 2. To convert a binary number to decimal, you multiply each binary digit by its corresponding power of 2 and add them all together.

Binary Digit 1 0 1 1
Power of 2
Place Value 8 4 2 1

For the binary number 1011: (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 8 + 0 + 2 + 1 = 11


Frequently Asked Questions

What is the binary number system?

The binary number system is a base-2 number system. This means it only uses two symbols to represent all numbers: a 0 and a 1. This is in contrast to the decimal (or denary) system that we use daily, which is a base-10 system (using digits 0-9). Each digit in a binary number is called a bit.

Why do computers use binary?

Computers use binary because their most basic hardware components, transistors, exist in one of two states: on or off. These two states can be perfectly represented by the two digits of binary (1 for “on,” 0 for “off”). This simple, reliable system is the foundation for all modern digital logic and computation.

What is a “bit” and a “byte”?

  • A bit (short for binary digit) is the smallest unit of data in a computer. It can hold a single value of either 1 or 0.

  • A byte is a group of 8 bits. A byte can represent 256 different values (from 00000000 to 11111111). Bytes are the standard unit used to measure data size (e.g., kilobytes, megabytes, gigabytes).

How do you represent negative numbers in binary?

The most common method is called Two’s Complement. In a fixed-length system (like an 8-bit byte), the most significant bit (the leftmost one) is used to indicate the sign (0 for positive, 1 for negative). To get the two’s complement of a number, you flip all the bits (0s become 1s and 1s become 0s) and then add one. This clever system allows the same hardware circuits to be used for both addition and subtraction.

How do you represent fractions or decimals in binary?

This is done using a system called floating-point representation. Similar to how we use a decimal point, binary uses a “binary point.” The place values to the right of the point are negative powers of 2: (0.5), (0.25), (0.125), and so on. For example, the binary number 101.101 would be (1×4)+(0×2)+(1×1) + (1×0.5)+(0×0.25)+(1×0.125) = 5.625.

How do you count in binary?

You count in binary just like in decimal, but when you run out of digits, you carry over to the next column.

  • 0 = 0

  • 1 = 1

  • 2 = 10 (one in the “twos” column, zero in the “ones” column)

  • 3 = 11 (one “two” and one “one”)

  • 4 = 100

  • 5 = 101

How high can you count on your fingers in binary?

Using your fingers, you can represent an impressive range of numbers. If you assign each of your 10 fingers a binary place value (from to ), you can count from 0 (all fingers down) all the way up to 1023 (all fingers up)!

Concrete Example: Representing Age in Binary

Let’s say a user is 25 years old. How would this be represented and used in a binary calculation?

  1. Convert 25 to binary:

    • The largest power of 2 less than 25 is 16 (). 25 - 16 = 9. So, we have a 1 in the 16s place.

    • The largest power of 2 less than 9 is 8 (). 9 - 8 = 1. So, we have a 1 in the 8s place.

    • We have a 0 in the 4s and 2s places.

    • We have a 1 in the 1s place.

    • The binary representation of 25 is 11001.

  2. Calculation: Let’s say we want to find out their age in 5 years. In binary, 5 is 101.

  3. Use the Calculator:

    • First Number: 11001

    • Operator: +

    • Second Number: 101

  4. Result: The calculator gives a binary result of 11110.

  5. Verification: Let’s convert 11110 back to decimal: (1×16) + (1×8) + (1×4) + (1×2) + (0×1) = 16 + 8 + 4 + 2 = 30. This is correct, as 25 + 5 = 30.

What does a “syntax error” mean?

A syntax error means you have entered an invalid character into one of the input fields. The binary calculator only accepts the digits 1 and 0. If you type any other character (like 2, 9, or a letter), it will result in an error.

Are there other number systems besides binary and decimal?

Yes! Two other common systems in computer science are:

  • Octal (base-8): Uses digits 0-7.

  • Hexadecimal (base-16): Uses digits 0-9 and letters A-F to represent values 10-15. Hexadecimal is very common for representing colors, memory addresses, and MAC addresses because it can represent a full byte (8 bits) with just two characters.


After performing your binary calculations, you might need to convert between different number systems. Use our Decimal to Binary Converter for quick conversions, or explore our Hexadecimal Calculator for working with the base-16 system.

Creator

Picture of Ismael Vargas

Ismael Vargas

An experienced software developer specializing in React, JavaScript, Django and Python, with more than six years’ expertise building full‑stack applications, data visualizations and cloud‑hosted solutions. He has a strong background in API integration, testing, and AWS services, delivering polished web products.
Scroll to Top