Bitwise Calculator

AND, OR, XOR, NOT and shifts on two integers. Results in decimal, hex and binary.

Frequently asked questions

Which bitwise operations are supported?

AND, OR, XOR, NOT (unary, on A), and left/right bit shifts. Enter A and B in decimal, hex (0x..) or binary (0b..) and the result shows in decimal, hex and binary.

Why is NOT giving a negative number?

JavaScript bitwise operations use signed 32-bit integers, so ~12 is -13 in signed decimal. The Unsigned 32-bit card shows the same bits read as an unsigned value.

Can I mix number bases?

Yes. A can be hex and B can be decimal, for example. Prefix hex with 0x and binary with 0b; plain numbers are read as decimal.