Bitwise XNOR: 1011 0110 ⊙ 0110 1101 — XNOR gate

coreagreement mask between two bytes

Answer

00100100

Why this example is worth doing

The complement of the XOR difference mask: a 1 marks each position where the bytes agree. Counting the 0s now gives the Hamming distance, and the page notes that this is why hardware comparators are often built from XNOR gates feeding an AND — all-agree is a single wide AND, whereas the XOR version needs an OR and an inverter. A small asymmetry that decides which gate a real comparator uses.

Try your own input in the XNOR gate. Truth table, symbol and algebraic form for A ⊙ B, the equality detector.

How the answer is reached

Column by column

A10110110

B01101101

result00100100

Column by column — columns bit, A, B, result
bitABresult
7100
6010
5111
4100
3010
2111
1100
0010

Compare with

Open the XNOR gate

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions
  • IEC 60617-12, Graphical Symbols for Diagrams — Binary Logic Elements