Binary Calculator

Enter two binary numbers and choose an operation.

Operation

AND, OR and XOR compare the numbers digit by digit.

Only the digits 0 and 1; a leading minus sign is allowed.

Only the digits 0 and 1; a leading minus sign is allowed.

Try

Result

You entered10112 + 1102\mathrm{1011}_{2}\ +\ \mathrm{110}_{2}

10112 + 1102=100012\displaystyle \mathrm{1011}_{2}\ +\ \mathrm{110}_{2} = \mathrm{10001}_{2}

Decimal

11+6=17\displaystyle 11 + 6 = 17

Hex

1116\displaystyle \mathrm{11}_{16}
Show the work
  1. Binary addition with carries

    Add the columns from the right. In binary 0+0=00 + 0 = 0, 0+1=10 + 1 = 1 and 1+1=101 + 1 = 10, so a column that reaches 2 writes 00 and carries 11 into the next column on the left. The small 11 marks each carry.

    1111011+11010001\begin{array}{rccccc} & {\scriptstyle 1} & {\scriptstyle 1} & {\scriptstyle 1} & & \\ & & 1 & 0 & 1 & 1 \\ + & & & 1 & 1 & 0 \\ \hline & 1 & 0 & 0 & 0 & 1 \end{array}
  2. Check in decimal

    Converting both numbers to decimal, adding, and converting back should give the same result.

    10112+1102=11+6=17=100012\begin{aligned} \mathrm{1011}_{2} + \mathrm{110}_{2} &= 11 + 6 \\ &= 17 \\ &= \mathrm{10001}_{2} \end{aligned}
  3. Result

    So 10112 + 1102=100012\mathrm{1011}_{2}\ +\ \mathrm{110}_{2} = \mathrm{10001}_{2}.

Worked examples

10112 + 1102\mathrm{1011}_{2}\ +\ \mathrm{110}_{2}
10112 + 1102=100012\mathrm{1011}_{2}\ +\ \mathrm{110}_{2} = \mathrm{10001}_{2}

Binary addition with carries, Check in decimal

10112 − 1102\mathrm{1011}_{2}\ -\ \mathrm{110}_{2}
10112 − 1102=1012\mathrm{1011}_{2}\ -\ \mathrm{110}_{2} = \mathrm{101}_{2}

Binary to decimal, Subtraction in decimal

1102 − 10112\mathrm{110}_{2}\ -\ \mathrm{1011}_{2}
1102 − 10112=−1012\mathrm{110}_{2}\ -\ \mathrm{1011}_{2} = -\mathrm{101}_{2}

Binary to decimal, Subtraction in decimal

10112 × 1102\mathrm{1011}_{2}\ \times\ \mathrm{110}_{2}
10112 × 1102=10000102\mathrm{1011}_{2}\ \times\ \mathrm{110}_{2} = \mathrm{1000010}_{2}

Binary to decimal, Multiplication in decimal

10112 ÷ 1102\mathrm{1011}_{2}\ \div\ \mathrm{110}_{2}
10112 ÷ 1102=12 remainder 1012\mathrm{1011}_{2}\ \div\ \mathrm{110}_{2} = \mathrm{1}_{2}\ \text{remainder}\ \mathrm{101}_{2}

Binary to decimal, Division with a remainder

10112 AND 1102\mathrm{1011}_{2}\ \mathrm{AND}\ \mathrm{110}_{2}
10112 AND 1102=102\mathrm{1011}_{2}\ \mathrm{AND}\ \mathrm{110}_{2} = \mathrm{10}_{2}

Binary to decimal, Bitwise AND

10112 OR 1102\mathrm{1011}_{2}\ \mathrm{OR}\ \mathrm{110}_{2}
10112 OR 1102=11112\mathrm{1011}_{2}\ \mathrm{OR}\ \mathrm{110}_{2} = \mathrm{1111}_{2}

Binary to decimal, Bitwise OR

10112 XOR 1102\mathrm{1011}_{2}\ \mathrm{XOR}\ \mathrm{110}_{2}
10112 XOR 1102=11012\mathrm{1011}_{2}\ \mathrm{XOR}\ \mathrm{110}_{2} = \mathrm{1101}_{2}

Binary to decimal, Bitwise XOR