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
| bit | A | B | result |
|---|---|---|---|
| 7 | 1 | 0 | 0 |
| 6 | 0 | 1 | 0 |
| 5 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 3 | 0 | 1 | 0 |
| 2 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 |