Bitwise Calculator
AND, OR, XOR, NOT and bit shifts of two integers, with binary shown.
Enter values
—
—
Step by step
The formula
operations are on 32-bit two’s-complement integers
Bitwise operators work on individual bits rather than numeric value. AND masks bits off, OR sets them, XOR flips them, and shifting left or right doubles or halves. They underpin permissions, flags, colour channels and network masks throughout computing.
All calculations run locally in your browser and update instantly as you type.
Example calculations
Common questions this calculator answers — select one to load its values.
Related calculators
Frequently asked questions
Why is NOT A negative?+
JavaScript-style bitwise NOT flips every bit of a 32-bit two’s-complement integer, so ~12 = −13. In two’s complement, ~x always equals −x − 1.
All calculations run locally in your browser. Nothing you type is sent to a server.