Math

Instant, private, and free

Bitwise AND Calculator.

Calculate the bitwise AND of two non-negative integers.

On-device calculationNo signup
01

Set your values

Results update as you type.

Result: 8

Result

0.000000

Results update automatically as you type.

Use Cases

Check if a number is even or odd

Use bitwise AND with 1 to quickly determine if a number is even (result 0) or odd (result 1).

Example: 7 AND 1 = 1 (odd), 8 AND 1 = 0 (even)

Mask specific bits in programming

Programmers use bitwise AND to clear or isolate certain bits in a binary number, often for flags or permissions.

Example: 0b1100 AND 0b1010 = 0b1000

Frequently Asked Questions

What is a bitwise AND operation?
A bitwise AND compares each bit of two numbers. If both bits are 1, the result bit is 1; otherwise, it's 0. For example, 5 (101) AND 3 (011) equals 1 (001).
Can I use negative numbers with this calculator?
No, this calculator only accepts non-negative integers. Negative numbers are not supported because their binary representation in two's complement would produce unexpected results.
How do I read the binary result?
The calculator shows the result in binary, which is the bitwise AND of the two input numbers. You can also see the decimal equivalent, which is the standard numeric value of that binary number.

Tips & Common Mistakes

Tips

  • Enter numbers in decimal or binary format if your browser supports it, but the calculator expects decimal integers.
  • For large numbers, the calculator handles up to 32-bit or 64-bit depending on your system, but results are accurate for non-negative integers.
  • Use the binary output to verify your manual bitwise calculations.
  • Remember that the result is always less than or equal to the smaller of the two inputs.

Common Mistakes to Avoid

  • Entering negative numbers, which are not supported and will cause an error.
  • Confusing bitwise AND with logical AND (&&). Bitwise AND operates on each bit, not on boolean values.
  • Assuming the result is always the smaller number; it's only true if the smaller number's bits are a subset of the larger's.

Last updated: August 13, 2026