User Rating 0.0
Total Usage 0 times
0 bits
Decimal: —
0 bits
Decimal: —
Bit width:
Is this tool helpful?

Your feedback helps us improve.

About

The XNOR (exclusive NOR) gate outputs TRUE when both inputs are identical. In digital circuit design, misidentifying XNOR as XOR inverts every bit of your result. This propagates catastrophically through adder chains, comparators, and parity checkers. The operation is formally defined as the complement of XOR: for bits A and B, the output is 1 when A = B and 0 otherwise. XNOR is also called the equivalence gate or biconditional connective () in propositional logic.

This calculator performs bitwise XNOR on operands up to 64 bits. Shorter operands are zero-padded to match the longer one. The tool displays a per-bit truth table breakdown so you can verify each stage. Note: results assume unsigned integer representation. Signed two's complement interpretation is left to the user. Pro tip: XNOR of a value with itself always yields all 1s. XNOR with all 1s is equivalent to bitwise NOT.

xnor bitwise binary calculator logic gates boolean algebra binary operations xnor gate digital logic

Formulas

The XNOR operation is defined as the logical complement of XOR. For single-bit operands:

A XNOR B = ¬(A B) = (A B) (¬A ¬B)

For multi-bit operands of length n, the operation is applied bitwise. Let A = an1...a1a0 and B = bn1...b1b0:

Ri = ¬(ai bi), for i = 0, 1, ..., n 1

Where Ri is the i-th bit of the result. The decimal value is recovered via positional notation:

R10 = n1i=0 Ri 2i

Where A = first binary operand, B = second binary operand, R = result, n = bit length (after zero-padding), = XOR operator, ¬ = NOT operator, i = bit position index (LSB = 0).

Reference Data

ABA AND BA OR BA XOR BA XNOR BNOT AA NAND BA NOR B
000001111
010110110
100110010
111101000
Common Multi-Bit XNOR Examples
101011000001 (XOR)1110 (XNOR) = 1410
111100001111 (XOR)0000 (XNOR) = 010
111111110000 (XOR)1111 (XNOR) = 1510
101100111100101001111001 (XOR)10000110 (XNOR) = 13410
000000000000000000000000 (XOR)11111111 (XNOR) = 25510
XNOR Algebraic Identities
A XNOR A= all 1s (identity)
A XNOR NOT A= all 0s
A XNOR 0= NOT A
A XNOR 1...1= A (all ones mask)
CommutativityA XNOR B = B XNOR A
Associativity(A XNOR B) XNOR C = A XNOR (B XNOR C)

Frequently Asked Questions

XOR outputs 1 when bits differ. XNOR is its exact complement: it outputs 1 when bits match. For any pair of operands A and B, A XNOR B equals NOT(A XOR B). This means every bit in the XNOR result is the inverse of the corresponding XOR bit. In an 8-bit context, if XOR yields 01111001, then XNOR yields 10000110.
The calculator zero-pads the shorter operand on the left (MSB side) to match the length of the longer operand. For example, if A = 101 (3 bits) and B = 11001 (5 bits), then A becomes 00101 before the operation. This preserves the unsigned integer value of both operands and is the standard convention in digital logic.
XNOR returns 1 for each bit position where the inputs match. If both operands are identical, every bit pair matches, so every output bit is 1. This is the equality-detection property of XNOR and is why it is used as the core element in digital comparator circuits. Conversely, XOR of two identical values yields all 0s.
Yes. An n-bit equality comparator is built by XNOR-ing each corresponding bit pair, then AND-ing all n outputs. If all XNOR outputs are 1 (meaning all bits match), the AND gate outputs 1, indicating equality. This is standard practice in ALU comparator design and costs n XNOR gates plus one n-input AND gate.
JavaScript uses IEEE 754 double-precision floats, which have 53 bits of mantissa. For binary-to-decimal conversion via parseInt, values beyond 53 bits lose precision. This calculator operates on binary strings character-by-character, so the XNOR result itself is always exact up to 64 bits. However, the displayed decimal equivalent may be approximate for operands exceeding 53 bits. The tool warns you when this occurs.
In propositional logic, yes. The biconditional A B is true when both propositions have the same truth value. This maps directly to XNOR at the bit level. In Boolean algebra notation: A XNOR B = A B = (A B) (¬A ¬B). The circle-dot symbol is the standard notation for XNOR in engineering texts.