AND Calculator

Compute the bitwise AND of two integers.

Result (decimal) 8
Result (binary) 1000

Formula: result bit = 1 only if both bits are 1

Step-by-step with your numbers:
1. Values used:
2. a (decimal) = 12
3. b (decimal) = 10
4.
5. Result (decimal) = 8
6. Result (binary) = 1000
Did we solve your problem today?

Bitwise AND keeps a 1 only where both inputs have a 1 in the same position.

The math behind it

Compare the numbers bit by bit; each output bit is 1 only if both corresponding input bits are 1.

Worked example

12 (1100) AND 10 (1010) = 8 (1000).

FAQ

What is AND used for?

Masking bits — keeping only the bits you care about.