Bitwise Calculator
Compute bitwise AND, OR, XOR and shifts on two integers, with decimal, hex and binary output.
How to use it
- Enter two values The operands, or a value and a shift amount.
- Pick an operation AND, OR, XOR or a bit shift.
- Read the result In decimal, hexadecimal and binary.
Examples
| 12 AND 10 | 8 |
|---|---|
| 5 << 2 | 20 |
About this tool
Bitwise operations work directly on the binary representation of numbers, and they’re everywhere in low-level code, flags and graphics. This calculator applies AND, OR, XOR and the three shift operators to two integers and shows the result three ways.
Seeing the answer in decimal, hexadecimal and binary side by side makes it easy to follow exactly which bits changed. The maths uses 32-bit signed integers, the same as most programming languages, and runs entirely in your browser.
Frequently asked questions
What integer size is used?
Operations use 32-bit signed integers, matching the bitwise behaviour of JavaScript, C and many other languages.
What's the difference between the shifts?
Left and right shifts preserve the sign bit; the unsigned right shift fills with zeros, so negative numbers become large positives.
Related tools
Updated June 13, 2026