Bitwise Operations Calculator

Enter two integers and see every bitwise operation at once — decimal and binary results side by side.

Bitwise basics

AND keeps bits set in both operands, OR keeps bits set in either, XOR keeps bits that differ. Shifts multiply or divide by powers of two — << fills with zeros, >> copies the sign bit, >>> fills from the left with zeros.

Frequently asked questions

32-bit limits?

JavaScript bitwise ops run on 32-bit integers; larger inputs are truncated.

Why is ~A negative?

NOT flips every bit including the sign bit — ~x always equals -(x+1).

Hex input?

Enter decimal; the binary column shows the bit pattern for any value.