[=] CalcStack

Home / Math / Binary

Binary Calculator

Do binary arithmetic and convert between binary, decimal and hexadecimal — instantly.

How to use this calculator

Enter two binary numbers (only 0s and 1s), pick an operation, and press Calculate. The tool returns the answer in binary, then shows its decimal and hexadecimal equivalents underneath, along with the conversion of each input. If you only want to convert a single number rather than do arithmetic, use the convert button and the second box is ignored. Everything updates instantly, so it works equally well for checking computer-science homework and for quick conversions while coding.

The formula explained

Binary is base 2: each position is worth twice the one to its right. Converting binary to decimal uses place values:

value = Σ (digit × 2^position)

Reading from the right, the positions are worth 1, 2, 4, 8, 16 and so on. Binary addition follows the same carry rules as decimal, except the only digits are 0 and 1: 1 + 1 equals 0 with a carry of 1 into the next column. Subtraction, multiplication and division work the same way they do in base 10, just with two symbols instead of ten. Hexadecimal (base 16) groups binary into blocks of four bits, which is why programmers use it as a compact shorthand for binary.

A worked example

Take 1010 + 110. In decimal those are 10 and 6. Adding column by column in binary: the rightmost column is 0 + 0 = 0; next is 1 + 1 = 0 carry 1; next is 0 + 1 plus the carry = 0 carry 1; the leftmost is 1 plus the carry = 10. The binary result is 10000, which is 16 in decimal and 10 in hexadecimal — and indeed 10 + 6 = 16. The calculator shows all three forms.

Frequently asked questions

How do you add binary numbers?

Add column by column from the right. 0+0=0, 0+1=1, and 1+1=0 with a carry of 1 into the next column — the same carry logic as decimal, in base 2.

How do you convert binary to decimal?

Multiply each digit by its place value (1, 2, 4, 8, 16…) and add the results.

What is binary 1010 in decimal?

It is 10: eight plus zero plus two plus zero.

Related calculators