Bitwise Calculator (AND, OR, XOR, NOT)
Enter two numbers to see their bitwise AND, OR, XOR and NOT.
Your numbers
Your results
Bitwise Calculator (AND, OR, XOR, NOT) by TheCalcTools
How the Bitwise Calculator (AND, OR, XOR, NOT) works
Bitwise operators work on each binary digit separately: AND gives 1 where both bits are 1, OR where either is 1, XOR where they differ, and NOT flips every bit within the chosen width.
They are used for flags, masks, permissions, hashing and low-level networking (subnet masks are a bitwise AND).
The formula
Worked example
Using the default values shown in the calculator:
| First number | 202 |
|---|---|
| Second number | 57 |
| Numbers are in | Decimal |
| Width for NOT | 8-bit |
- 202 = 11001010 and 57 = 00111001.
- AND = 8 (1000); OR = 251 (11111011); XOR = 243 (11110011).
Result:
| A AND B | 8 (1000) |
|---|---|
| A OR B | 251 (11111011) |
| A XOR B | 243 (11110011) |
| NOT A | 53 (110101) |
| AND, OR, XOR in hex | 8, FB, F3 |
Frequently asked questions
How is XOR used?
XOR toggles bits and is reversible: (A XOR K) XOR K = A, which is why it appears in checksums and simple ciphers.
Sources and further reading
Related calculators
More in AI & Computing · All calculators
This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.
