Home › Math & Study › Binary Calculator

Binary Calculator

This binary calculator does arithmetic and bitwise operations on binary numbers, and converts decimal numbers to binary. Results are shown in binary, decimal and hex.

Binary arithmetic

Decimal to binary

How binary works

Binary is base 2: each place is worth twice the one to its right (1, 2, 4, 8, 16…). 1011 = 8 + 0 + 2 + 1 = 11.

Addition rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1)

Bitwise operations

AND gives 1 only where both bits are 1; OR gives 1 where either bit is 1; XOR gives 1 where the bits differ. 1100 AND 1010 = 1000; 1100 OR 1010 = 1110; 1100 XOR 1010 = 0110.

Example

1011 + 110 is 11 + 6 = 17 in decimal, which is 10001 in binary. 255 in decimal is 11111111 (eight bits, one byte).

Tips

Frequently asked questions

What is 10 in binary?

1010.

How do I convert binary to decimal?

Add the place values of the 1s: 1101 = 8 + 4 + 1 = 13.

What is the largest number in 8 bits?

11111111 = 255.

Written and checked by Vijay. Last updated .