Beginner

AND Calculator — Bitwise AND Operation

Compute A AND B in one click: enter two integers and see the bitwise AND result with its binary and hex representations side by side.
Integer; negative values use two's complement
Integer; negative values use two's complement
A AND B
8

Bitwise AND — only bits set in both operands appear in the result

A (decimal)
12
B (decimal)
10
A AND B (decimal)
8
A (binary)
00001100
B (binary)
00001010
A AND B (binary)
00001000
A AND B (hex)
0x8
Set bits in result
1
13%
88%
Set bits (1)
Clear bits (0)
Proportion of set bits in the AND result
परिणाम केवल सामान्य जानकारी के लिए अनुमान हैं और पेशेवर सलाह नहीं हैं — महत्वपूर्ण परिणामों पर भरोसा करने से पहले हमेशा उन्हें स्वतंत्र रूप से सत्यापित करें। पूरा अस्वीकरण पढ़ें.
त्वरित उत्तर

यह कैलकुलेटर कैसे काम करता है?

Bitwise AND compares two integers bit by bit, outputting 1 only where both bits are 1. For example 12 (1100₂) AND 10 (1010₂) = 8 (1000₂). The result has bits set only where both operands agree. AND is commonly used for masking, flag testing, and bit extraction in programming.

सूत्र
A AND B = each bit position is 1 only when the corresponding bit is 1 in both A and B.
How this is calculated

Bitwise AND compares two integers bit by bit. At each bit position it outputs 1 if both input bits are 1, and 0 otherwise — so the result can only have bits set where both operands agree. For example 12 (binary 1100) AND 10 (binary 1010) = 8 (binary 1000): only the third bit from the right is 1 in both operands.

Negative numbers are handled using two's complement, which is the standard signed integer representation in virtually all modern hardware and programming languages. In two's complement, AND of two negative numbers can produce a negative result; the binary display uses the two's complement bit pattern for the selected word width.

Common uses of AND include masking (isolating specific bits by ANDing with a mask), checking whether a number is even (n AND 1 equals 0 for even numbers), and clearing individual flag bits in a status register. The result is always ≤ both operands in magnitude for non-negative inputs.

अक्सर पूछे जाने वाले प्रश्न

Bitwise AND operates on corresponding bits of two integers: the output bit is 1 only when both input bits are 1. This differs from logical AND, which returns a single Boolean true/false based on whether two whole values are both non-zero.

AND outputs 1 only when both bits are 1; OR outputs 1 when at least one bit is 1. As a result AND can only clear bits (result ≤ each operand for positives), while OR can only set bits (result ≥ each operand for positives).

Bit masking: to check whether bit k is set in an integer n, compute n AND (1 << k). If the result is non-zero, bit k is 1. To extract the lower 8 bits of a number, AND it with 255 (0xFF). Both operations are fundamental in systems programming and embedded development.

इस नाम से भी जाना जाता है

bitwise and calculator
binary and operation
logical and calculator
and operator binary
bit masking calculator
boolean and gate
integer bitwise and

APA

TG we-Calculate Editorial Team. (2026). AND Calculator — Bitwise AND Operation [Online calculator]. TG we-Calculate. https://we-calculate.com/hi/calculator/and-calculator

Chicago

TG we-Calculate Editorial Team. "AND Calculator — Bitwise AND Operation." TG we-Calculate. 2026. https://we-calculate.com/hi/calculator/and-calculator.

IEEE

TG we-Calculate Editorial Team, "AND Calculator — Bitwise AND Operation," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/hi/calculator/and-calculator

BibTeX

@misc{wecalculate_and_calculator, title = {AND Calculator — Bitwise AND Operation}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/hi/calculator/and-calculator}}, year = {2026}, note = {TG we-Calculate} }

क्या इस कैलकुलेटर ने आपकी मदद की?

संबंधित कैलकुलेटर