Bitwise Calculator
Enter two whole numbers and a shift amount.
This result is an estimate only. Double-check important figures before relying on them.
How it is calculated
- Both numbers are treated as 32-bit unsigned integers
- AND, OR and XOR compare the bits at each position
- NOT flips all 32 bits
- Shifts move the bits of A left or right by the chosen amount
To see a number in other bases, use the number base converter.
Worked example
12 (1100) and 10 (1010):
- AND = 8 (1000)
- OR = 14 (1110)
- XOR = 6 (110)
Why your number may differ
Different languages treat sign and word size differently. This calculator uses 32-bit unsigned results.
Frequently asked questions
What do the bitwise operators do?
They work on the individual bits of numbers. AND keeps bits that are 1 in both, OR keeps bits that are 1 in either, and XOR keeps bits that differ.
What do shifts do?
A left shift moves bits towards the high end, which doubles the number for each place. A right shift halves it, dropping the lowest bit.
Why is NOT a big number?
NOT flips all 32 bits, so a small number becomes a number near 4.29 billion when read as unsigned.