And Calculator

Bitwise AND Calculator

Apply a signed 32-bit bitwise AND to two integers entered in decimal, binary, or hexadecimal.

Last updated: August 2026 | By Summa Calculator

Signed 32-bit AND
Inputs represent signed integers from -2,147,483,648 through 2,147,483,647. AND keeps a 1 only where both 32-bit input patterns contain 1.
Result
8
1000
0x8

32-bit Binary Representation

Number 1: 00000000000000000000000000001100
Number 2: 00000000000000000000000000001010
AND Result: 00000000000000000000000000001000

Bit-by-Bit Check

A
B
A AND B
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
1
0
0
0
0

What Bitwise AND Does

Bitwise AND compares corresponding bits of two integers. The result bit is 1 only when both input bits are 1.

0 AND 0 = 0
0 AND 1 = 0
1 AND 0 = 0
1 AND 1 = 1

This is the same truth rule as Boolean AND, applied independently at every bit position.

Worked Example: 12 AND 10

Write both values in binary and align equal place values:

12 = 1100
10 = 1010
AND  1000
1000₂ = 8₁₀ = 0x8

Only the 8's bit is 1 in both operands, so 12 AND 10 equals 8.

Signed 32-bit Interpretation

This implementation uses JavaScript's bitwise AND operator, which operates on signed 32-bit integers. Negative values are represented in two's complement.

-1 = 11111111111111111111111111111111
5  = 00000000000000000000000000000101
-1 AND 5 = 5

The input range is restricted to signed 32-bit values so larger integers cannot silently wrap to a different bit pattern.

Masks and Flags

A mask has 1s in positions you want to inspect or preserve. AND clears every position where the mask contains 0.

value AND mask

For bit flags, testing value AND mask can reveal whether selected bits are set without modifying the original value.

Questions About This AND Calculator

Is this Boolean AND or bitwise AND?

It is a bitwise AND calculator. It applies the Boolean AND truth rule separately to each of 32 bit positions.

Can I enter negative integers?

Yes. Signed 32-bit negative values are represented with two's complement.

Why are inputs reset when I change base?

Decimal, binary, and hexadecimal are input modes. Resetting prevents text from the previous base from being silently reinterpreted in the new one.

Can I enter values larger than 32 bits?

No. This implementation deliberately restricts inputs to the signed 32-bit range because JavaScript bitwise operators coerce operands to 32-bit integers.

Related Tools