Binary Calculator & Converter

Add, subtract, multiply, divide, or convert binary numbers using the calculator below.

Binary Result:

 

Decimal Result:

 

Hex Result:

 
Learn how we calculated this below

scroll down


On this page:


How to Add Binary Numbers

Unlike the decimal system, the binary system is a base 2 number system and only uses the digits 0 and 1.

Binary addition is very similar to adding decimal numbers, and you can do it using place value.

graphic showing how to add binary numbers together

So, to add two binary numbers, write the second number below the first number, aligning the right digits like this:

0 1 0 1 0
+ 1 1 1 0 1

Starting at the right-most number, add the top and bottom values together. In this case, 0 + 1 is equal to 1.

0 1 0 1 0
+ 1 1 1 0 1
1

Then, continue with the second number from the right; 1 + 0 is equal to 1.

0 1 0 1 0
+ 1 1 1 0 1
1 1

Move on to the third number from the right; 0 + 1 is equal to 1 again.

0 1 0 1 0
+ 1 1 1 0 1
1 1 1

With the next column, things start to get interesting. Adding 1 + 1 is equal to 2 in the decimal system, but the binary system only uses the digits 1 and 0.

In binary, 1 + 1 is equal to 10. In our problem, carry the leading 1 to the top of the problem over the first column of digits and move the trailing 0 to the bottom.

1
0 1 0 1 0
+ 1 1 1 0 1
0 1 1 1

In the next step, add the 1 at the top of the first column with the other values; 1 + 0 + 1 is equal to 10 in binary. You’ll need to carry to 1 to the top again and the 0 to the bottom like this:

1 1
0 1 0 1 0
+ 1 1 1 0 1
0 0 1 1 1

The final step is to move the final 1 from the very top to the bottom since 1 + 0 + 0 is equal to 1. Thus the answer is 100111.

1 1
0 1 0 1 0
+ 1 1 1 0 1
1 0 0 1 1 1

How to Convert a Binary Number

To convert a binary number to decimal, use the following formula:

decimal number10 = (d0 × 20) + (d1 × 21) + … + (dn – 1 × 2n – 1)

In the formula above, d0 is the binary digit furthest to the right, d1 is the digit one position from the right, and dn – 1 is the digit furthest to the left.

How to Convert a Decimal to Binary Number

You can convert from decimal to binary using successive division by 2.

To use the successive division by two method, divide the decimal number by 2 using long division. There should be a remainder of 0 or 1; write that to the side of the division problem.

Take the result of the first division problem and divide that by 2 again. Like before, there should be a remainder of 0 or 1, which you should write to the side of the problem.

Continue this process until the result is 0.

The remainders that you wrote to the side of the division problems are the resulting binary number. The number should be read from the bottom to the top since the least significant digit will be at the top, and the most significant digit will be at the bottom.

Frequently Asked Questions

How do binary numbers work?

A binary number is the smallest unit of data that consists of the digits 0 and 1. As the number is read from right to left, the value of the “1” digit increases by a factor of 2. Then, the value of each “1” is added together to find the total numerical value.

How do decimal places work in binary?

Binary decimal places are based on the power of 2. Each decimal place can only have a value of 0 or 1. The decimal places are 1s, 2s, 4s, 8s place, etc.

What is binary used for?

Binary is most widely used for computer applications for a few reasons.

First, modern computers, chips, and memory components are built using transistors that support two states, on and off.

Second, mathematical operations are typically simpler in binary than they are in other number systems, requiring less computing power to perform.