Skip to main content
math

AND Calculator

Perform the bitwise AND operation on two numbers. Each output bit is 1 only when both corresponding input bits are 1.

Reviewed by Chase FloiedUpdated

This free online and calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the AND Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The AND Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

AND Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the AND Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The AND Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Perform the bitwise AND operation on two numbers. Each output bit is 1 only when both corresponding input bits are 1. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About AND Calculator

The AND operation is the most fundamental bitwise operation. It compares each pair of corresponding bits in two numbers and produces a 1 only when both bits are 1; otherwise it produces 0. AND is used for bit masking — extracting specific bits from a number by ANDing with a mask that has 1s in the positions you want to keep and 0s elsewhere. It is also used for clearing bits (AND with 0 clears), checking if a bit is set (AND with a power of 2), and implementing subnet masks in networking. AND gates are one of the basic building blocks of digital circuits.

The Math Behind It

The AND operation satisfies: A & 0 = 0 (annihilation), A & A = A (idempotent), A & ~A = 0, A & (all 1s) = A (identity), A & B = B & A (commutative), (A & B) & C = A & (B & C) (associative). De Morgan's law: ~(A & B) = ~A | ~B. AND is used in: bit masking (value & mask), testing bit k (value & (1 << k)), clearing bit k (value & ~(1 << k)), computing modulo powers of 2 (n & (m-1) = n mod m when m is a power of 2). In networking, IP & SubnetMask = NetworkAddress.

Formula Reference

AND Truth Table

0&0=0, 0&1=0, 1&0=0, 1&1=1

Variables: Output is 1 only when both inputs are 1

Worked Examples

Example 1: 60 AND 13

Compute bitwise AND of 60 and 13.

Step 1:60 = 111100₂
Step 2:13 = 001101₂
Step 3:AND: 001100₂

60 AND 13 = 12₁₀ = 001100₂

Common Mistakes & Tips

  • !Confusing & (bitwise AND) with && (logical AND) in programming.
  • !Expecting AND to add or combine values — it only keeps bits where both inputs have 1.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

How do I check if a specific bit is set?

AND the number with 2^k (or 1 << k) where k is the bit position. If the result is non-zero, bit k is set.