Mathematics
July 22, 2026 · 10 min read
The Bitwise AND Operation: A Comprehensive Guide to Boolean Logic in Computing
Master the bitwise AND operation with truth tables, worked examples, and applications in digital logic, networking, and programming.
Try the free calculator
Put these formulas into practice with our instant, step-by-step AND Calculator.
The bitwise AND operation compares each bit of two numbers and returns 1 only if both bits are 1. It is the fundamental building block of digital logic, used in AND gates, bit masking, network subnetting, and conditional programming.
Key Takeaway
Bitwise AND returns 1 only when both input bits are 1. It is used for bit masking, flag checking, and digital logic circuits.
1. The AND Truth Table
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
2. Worked Example
12 AND 10: 12 = 1100, 10 = 1010. AND each bit: 1∧1=1, 1∧0=0, 0∧1=0, 0∧0=0. Result: 1000 = 8.
3. Applications
- Bit masking: Extract specific bits (AND with mask)
- Network subnetting: AND IP with subnet mask
- Flag checking: Test if specific bits are set
- Digital logic: AND gates in circuits
© 2026 Calculator Archive.