Bitwise Calculator

Find AND, OR and XOR of two numbers.

AND (a & b) 8
OR (a | b) 14
XOR (a ^ b) 6

Formula: compare bits position by position

Step-by-step with your numbers:
1. Values used:
2. Number A = 12
3. Number B = 10
4.
5. AND (a & b) = 8
6. OR (a | b) = 14
7. XOR (a ^ b) = 6
Did we solve your problem today?

Perform the core bitwise logic operations on two integers.

The math behind it

AND keeps bits set in both; OR keeps bits set in either; XOR keeps bits set in exactly one.

Worked example

12 & 10 = 8, 12 | 10 = 14, 12 ^ 10 = 6.

FAQ

See the bits?

Use the Number Base converter to view binary.