Bitwise Calculator
Compute AND, OR, XOR, NOT, and bit shifts on integers, live as you type.
Operates on 32-bit signed integers, matching JavaScript's own bitwise operators. Updates live. Runs entirely in your browser.
What is Bitwise Calculator?
Enter one or two integers, pick an operation (AND, OR, XOR, NOT, left/right shift), and see the result instantly in both decimal and binary — using JavaScript's own 32-bit bitwise operators, the same ones your code would use. Useful for sanity-checking a bitmask, flag combination, or shift operation before it goes into code — or for working out by hand what a line like `flags & 0x08` or `value >> 2` actually evaluates to. Everything computes live in your browser as you type, with no size limit beyond the 32-bit range the operations themselves are defined over.
FAQ
32-bit signed integers, matching JavaScript's native bitwise operator behavior exactly.
Bitwise NOT flips every bit, and since the result is a 32-bit signed integer, flipping the sign bit produces a negative value — this matches what `~x` does in JavaScript, C, and most other languages.
A regular right shift preserves the sign bit (fills with 1s for negative numbers), while an unsigned right shift always fills with 0s — matching JavaScript's `>>` versus `>>>` operators.