Perform binary addition, subtraction, multiplication, and division instantly. Convert between binary and decimal with step-by-step solutions. Free online binary calculator with conversion table, two's complement, and real-world examples.
Binary CalculationβAdd, Subtract, Multiply, or Divide
The binary system is a numerical system that functions virtually identically to the decimal number system that people are likely more familiar with. While the decimal number system uses the number 10 as its base, the binary system uses 2. Furthermore, although the decimal system uses the digits 0 through 9, the binary system uses only 0 and 1, and each digit is referred to as a bit. Apart from these differences, operations such as addition, subtraction, multiplication, and division are all computed following the same rules as the decimal system.
Almost all modern technology and computers use the binary system due to its ease of implementation in digital circuitry using logic gates. It is much simpler to design hardware that only needs to detect two states, on and off (or true/false, present/absent, etc.). Using a decimal system would require hardware that can detect 10 states for the digits 0 through 9, and is more complicated.
| Decimal | Binary |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 10 |
| 3 | 11 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
| 8 | 1000 |
| 9 | 1001 |
| 10 | 1010 |
| 11 | 1011 |
| 12 | 1100 |
| 13 | 1101 |
| 14 | 1110 |
| 15 | 1111 |
Reading binary is easier than it looks. You just need to understand place values.
In decimal, each position represents a power of 10. The number 342 means 3 hundreds, 4 tens, and 2 ones.
In binary, each position represents a power of 2. Let's look at the binary number 1011.
Starting from the rightmost digit (the "least significant bit"):
So 1011 in binary means: (1 Γ 8) + (0 Γ 4) + (1 Γ 2) + (1 Γ 1) = 8 + 0 + 2 + 1 = 11 in decimal.
Example: 18 in binary
18 = 16 + 2 = 2β΄ + 2ΒΉ
10010 = (1Γ2β΄) + (0Γ2Β³) + (0Γ2Β²) + (1Γ2ΒΉ) + (0Γ2β°) = 18
Our calculator does this automatically, but it's good to know how it works.
Multiply each digit by its place value (powers of 2) and add them up. For 11010: 1Γ16 + 1Γ8 + 0Γ4 + 1Γ2 + 0Γ1 = 16+8+0+2+0 = 26
Keep dividing by 2 and write down the remainders. Convert 13: 13Γ·2=6 r1, 6Γ·2=3 r0, 3Γ·2=1 r1, 1Γ·2=0 r1. Read remainders bottom to top: 1101.
Adding binary numbers is like adding decimal numbers, but simpler because you only have two digits.
Binary addition follows the same rules as decimal addition except that carrying occurs when values added equal 2 (rather than 10 in decimal). When 1 + 1 = 0 with a carry, and a 1 is also carried from the previous column, the result becomes 1 (1 + 1 + 1 = 1, carry 1).
Example: 101 + 110
Line them up: 1+0=1, 0+1=1, 1+1=0 carry 1. Result: 1011 (11 in decimal). Check: 5 + 6 = 11. β
Binary subtraction uses borrowing, just like decimal subtraction. But it works a little differently.
The only case where borrowing is necessary is when 1 is subtracted from 0. The 0 becomes "2" (changing 0-1 into 2-1 = 1) while reducing the 1 in the column being borrowed from by 1. If that column is also 0, borrowing continues from each subsequent column until a 1 can be reduced.
Example: 1101 - 101
1-1=0, 0-0=0, 1-1=0, 1-0=1. Result: 1000 (8 in decimal). Check: 13 - 5 = 8. β
Binary multiplication is actually easier than decimal multiplication. You're just multiplying by 0 or 1.
To multiply, you do the same thing as decimal multiplication. Multiply each digit of the second number by the first number, shift left for each digit, then add them up. Each row is either the first term or 0. Placeholder 0's need to be added in subsequent rows, just like decimal multiplication.
Example: 101 Γ 11
101 Γ 1 = 101, 101 Γ 1 shifted = 1010. Add: 101 + 1010 = 1111 (15 in decimal). Check: 5 Γ 3 = 15. β
Division in binary is like long division in decimal, but simpler because you only divide by 1 or 0. You basically ask: "Does the divisor fit into this part of the dividend?" If yes, put a 1 in the quotient and subtract. If no, put a 0 and move to the next digit. The process of binary division is similar to long division in the decimal system, with the only significant difference being the use of binary rather than decimal subtraction.
Example: 1100 Γ· 10 (12 Γ· 2)
10 fits into 11 once β 1, subtract β 10, bring down 0, 10 fits once β 1, subtract β 0. Result: 110 (6 in decimal). Check: 12 Γ· 2 = 6. β
You might be wondering: why not just use decimal? Wouldn't that be easier for humans? Sure, for us. But for computers, binary is the simplest possible system. Here's why:
Here's something most beginners don't know. How do computers represent negative numbers in binary?
The answer is two's complement. It's a way to represent both positive and negative numbers using only 0s and 1s.
Here's how it works for a 4-bit system:
To find the two's complement of a number (to make it negative):
Example: Find -5 in binary (4 bits):
5 in binary: 0101 β Flip bits: 1010 β Add 1: 1011. So -5 in two's complement is 1011. The cool thing is that addition and subtraction work the same way β you don't need special circuits for subtraction. Just add the two's complement.
After looking at Reddit and helping students, here are the most common errors:
Forgetting to carry in addition: When you add 1+1, you get 0 with a carry of 1. Don't forget that carry! It's the most common mistake.
Borrowing wrong in subtraction: When you borrow in binary, you're borrowing 2, not 10. So if you borrow from a 1, that 1 becomes 0, and the digit you borrowed for becomes 2 (in binary terms).
Mixing up binary and decimal: Remember, 10 in binary is 2 in decimal. Not 10. This trips up everyone at first.
Not aligning numbers properly: When adding or subtracting, line up the rightmost digits. Just like in regular math.
Forgetting leading zeros: 0011 is the same as 11 in binary. Leading zeros don't change the value, but they help with alignment.
Binary isn't just for math class. It's everywhere:
Binary isn't a modern invention. The idea goes back to ancient times. But the person who really figured it out was Gottfried Wilhelm Leibniz in the 1600s.
Leibniz was a German mathematician and philosopher. He was fascinated by the idea of a universal language based on just two symbols. He saw binary as representing the concept of creation: 1 for God, 0 for nothingness.
He even made a binary calculator that used marbles rolling down tracks. It didn't work great, but the idea was brilliant.
It took another 200 years for technology to catch up. In the 1930s and 1940s, engineers like Claude Shannon and John von Neumann realized that binary was perfect for electronic computers. And the rest is history.
Practice with small numbers first. Start with 0-15 in binary. That's only 4 bits.
Use our calculator to check your work. Do a problem by hand, then verify with the calculator.
Learn the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. These are the foundation of binary.
The binary system is used by virtually all modern computers and digital devices. It's the foundation of how computers store data, process information, and communicate. Everything from your smartphone to the internet relies on binary code.
Multiply each binary digit by its place value (powers of 2, starting from 2β° at the rightmost digit) and add the results. For example, 1101 = (1Γ8) + (1Γ4) + (0Γ2) + (1Γ1) = 8 + 4 + 0 + 1 = 13. Our calculator does this conversion instantly.
Divide the decimal number by 2 repeatedly, keeping track of the remainders. The binary number is formed by reading the remainders from bottom to top. For example, 13Γ·2=6 r1, 6Γ·2=3 r0, 3Γ·2=1 r1, 1Γ·2=0 r1 β 13 in binary is 1101.
Computers use binary because it's more reliable, simpler, and cheaper. A switch can only be ON or OFF (1 or 0). In decimal, you'd need 10 different voltage levels, which is much harder to get right. Binary circuits can be made incredibly small β billions of transistors on a single chip.
A bit is a single binary digit β either a 0 or 1. A byte is 8 bits grouped together. One byte can represent 256 different values (2βΈ). Bytes are the standard unit for measuring computer memory and storage.
Two's complement is how computers represent negative numbers in binary. To find it: flip all the bits (0β1, 1β0) and add 1. For example, 5 (0101) β flip (1010) β add 1 = 1011, which represents -5. This allows addition and subtraction to work the same way.