NumForge LogoNumForge
Explore
Digital Electronics ToolsFree Interactive Tool

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.

Engine: Client-Side Verified (0ms Latency)

Enter binary or decimal numbers.

Calculated Output

Primary Representation
Calculating...

Step-by-Step Mathematical Proof

Active Derivation
Ready. Enter input above to generate derivation.
Concept

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

Methodology

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.

Formula & Rules

Mathematical Algorithm

C_i = A_i \land B_i \quad \text{for all bit positions } i
Worked Problem

Step-by-Step Example

Bitwise AND 11001100 & 10101010: 11001100 & 10101010 ---------- 10001000_2 (decimal 136).

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

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.