Binary Calculator

Enter two binary numbers and choose an operation — addition, subtraction, multiplication, or division — to get the binary result along with its decimal and hexadecimal equivalents. You can also convert a binary number to decimal or a decimal number to binary using the conversion fields below.

Enter a binary number using only 0s and 1s.

Enter a binary number using only 0s and 1s.

Enter a binary number to convert it to decimal.

Enter a decimal (base-10) integer to convert to binary.

Results

Binary Result

--

Decimal Result

--

Hexadecimal Result

--

Binary → Decimal

--

Decimal → Binary

--

Results Table

Frequently Asked Questions

What is a binary number?

A binary number is expressed in base-2, using only the digits 0 and 1. Each digit is called a bit. For example, the decimal number 10 is represented as 1010 in binary, and 100 in decimal is 1100100 in binary.

How do I add two binary numbers?

Binary addition follows the same column-by-column rules as decimal addition, but with only two digits. Key rules: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), and 1+1+1=11 (write 1, carry 1). For example, 1101 + 1010 = 10111.

How does binary subtraction work?

Binary subtraction is similar to decimal subtraction. When the top digit is smaller than the bottom digit, you borrow from the next higher bit. For example, 1101 − 1010 = 0011. Negative results occur when the second number is larger than the first.

How do I convert a binary number to decimal?

Multiply each binary digit by 2 raised to the power of its position (starting from 0 on the right), then sum the results. For example, 1101 in binary = (1×8) + (1×4) + (0×2) + (1×1) = 13 in decimal.

How do I convert a decimal number to binary?

Repeatedly divide the decimal number by 2 and record the remainders. Reading the remainders from bottom to top gives the binary representation. For example, 25 ÷ 2 gives remainders 1,0,0,1,1, so 25 in decimal = 11001 in binary.

What is hexadecimal and how does it relate to binary?

Hexadecimal (base-16) uses digits 0–9 and letters A–F. It is closely related to binary because each hex digit corresponds exactly to a 4-bit binary group. For example, binary 1111 = hex F, and binary 1010 = hex A, making conversions straightforward.

Can binary numbers be negative?

Yes. In computing, negative binary numbers are typically represented using two's complement notation. This calculator shows the arithmetic result; if your subtraction yields a negative number, the decimal result will be negative.

What is binary division and how is it calculated?

Binary division works like long division in decimal, but only using 0s and 1s. The calculator computes the quotient as a decimal value when binary division results in a non-terminating binary fraction. For example, 1100 ÷ 0011 = 100 (i.e., 12 ÷ 3 = 4).

More Math Tools