XNOR Calculator

Client-sideNo sign-upFree

Compute the bitwise XNOR (NOT XOR) of two numbers, with results in decimal, binary, and hex.

Quick facts

Category
Calculators
Best for
Checking which bit positions match between two binary values
A (decimal, 0b-binary, or 0x-hex)
Binary: 00001100 · Hex: 0x0C
B (decimal, 0b-binary, or 0x-hex)
Binary: 00001010 · Hex: 0x0A
✓ Calculated (XNOR = NOT(A XOR B))
Decimal
249
Binary
11111001
Hex
0xF9
In-content slot
Was this tool helpful?
On this page

Overview

Enter two operands - in decimal, 0b-prefixed binary, or 0x-prefixed hex - and a bit width (8, 16, or 32-bit), and this tool computes their bitwise XNOR: NOT(A XOR B). XNOR flips XOR's logic, producing a 1 in every bit position where A and B match (both 0 or both 1) and a 0 where they differ, which makes it useful for bit-level equality checks - comparing two values bit by bit to see which positions agree. The result is shown simultaneously in decimal, binary (zero-padded to the selected width), and hex, and each operand's own binary/hex representation is shown as you type so you can verify what you actually entered. This complements bitwise-calculator, which covers AND, OR, XOR, NOT, and shift operations but not XNOR, and shares its bit-masking logic with nand-calculator and nor-calculator so a NOT step behaves consistently (bounded, non-negative) across all three rather than relying on JavaScript's unbounded/negative bitwise semantics. Runs entirely client-side.

Best for: Checking which bit positions match between two binary values

How to use this tool

  1. Enter A and B. Values can be typed as decimal, 0b-binary, or 0x-hex, and are validated against the selected bit width.
  2. Pick a bit width. Choose 8, 16, or 32-bit - this controls both the valid input range and how the result is padded.
  3. Read the result. XNOR = NOT(A XOR B) is shown in decimal, binary, and hex simultaneously.

Frequently asked questions

XOR produces a 1 wherever the two input bits differ and a 0 where they match. XNOR is its exact inverse - it produces a 1 wherever the bits match (both 0 or both 1) and a 0 where they differ - which is why it's computed here as NOT(A XOR B).

bitwise-calculator covers the more commonly needed AND, OR, XOR, NOT, and shift operations. XNOR is a distinct, less frequently needed operation, and giving it (along with NAND and NOR) its own focused tool keeps each page's interface simple rather than cramming every possible logic gate into one selector.

XNOR is commonly used in digital logic design for bit-level equality comparison (two equal-width binary values are identical exactly when their XNOR is all 1s), parity checking, and certain error-detection circuits.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools