Math

AND Calculator

Compute the bitwise AND of two integers.

Parameters Live Compute
Calculated Output
Result (decimal) 8
Result (binary) 1000
Formula: result bit = 1 only if both bits are 1
Step-by-Step Breakdown
1. Values used:
2. a (decimal) = 12
3. b (decimal) = 10
4.
5. Result (decimal) = 8
6. Result (binary) = 1000
Did this calculator solve your problem today?
Report issue to loopingon.com
Sponsored

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).

Frequently Asked Questions

What is AND used for?

Masking bits — keeping only the bits you care about.

Advertisement