Bitwise AND Calculator
Compute bitwise AND (&) between two binary numbers to mask, clear, and isolate specific bits. Designed for software developers, electrical engineers, students, and computer architecture researchers requiring deterministic client-side accuracy.
Enter binary or decimal numbers.
Calculated Output
Step-by-Step Mathematical Proof
Active DerivationWhat Is Bitwise AND Calculator?
The Bitwise AND operator (&) compares corresponding bits of two operands. A bit in the result is 1 if and only if both input bits are 1; otherwise, the result bit is 0.
How Does It Work?
Apply the logical AND truth table column by column: 0 & 0 = 0, 0 & 1 = 0, 1 & 0 = 0, 1 & 1 = 1.
Mathematical Algorithm
Step-by-Step Example
Important Rules & Edge Cases
- 1 & 1 = 1; all other combinations result in 0.
- ANDing with 0 clears a bit; ANDing with 1 preserves a bit.
Practical Applications in Engineering
- Masking out unwanted bits (e.g. extracting the low nibble: value & 0x0F).
- Checking if a number is even or odd (value & 1 == 0 -> even).
- Testing if a specific permission flag is enabled.
Common Mistakes to Avoid
- Caution: Confusing bitwise AND (&) with logical AND (&&) in programming.
- Caution: Misaligning bits of different lengths.
Frequently Asked Questions
How do you check if the 3rd bit of a variable is set?
Use the bitwise AND expression: (value & (1 << 3)) != 0.
Related Tools
View All Digital Electronics Tools →Bitwise OR Calculator
Compute bitwise OR (|) between two binary numbers to set and combine bit flags.
Bitwise XOR Calculator
Compute bitwise XOR (^) to toggle bits, compute parity, and implement basic encryption.
Bitwise NOT Calculator
Compute bitwise NOT (~) to invert all bits in an operand across 8, 16, 32, and 64-bit registers.
NAND Calculator
Compute the universal NAND logic operation (NOT AND) with full truth tables and proofs.