Electronic – Why is XNOR gate not referred to as an “Equality” gate

digital-logiclogic-gates

I am a programmer and I was thinking about some logic I was just writing and the logical statement started out as a negated exclusive or, but this simplifies to a logical equality check, e.g. var x = a == b. That is to say, we can express this as x <- a XNOR b.

Since I was looking at the XOR page i found that there is an XNOR gate which is just an XOR gate negated. It got me to wondering because XNOR seems like such a convoluted way to refer to the concept of what this gate does.

I wonder if this is just how history played out, or if there is something subtle that I'm missing.

Best Answer

I think that's a valid observation.

The reason it's called an XNOR is that all logic gates are based on boolean algebra. The boolean operations of conjunction, disjunction and negation map isometrically to AND, OR and NOT. Combining negation with conjunction and disjunction gives you NAND and NOR and exclusive disjunction gives you XOR. Naturally then, when you add negation, you get XNOR (which is simply easier to say than NXOR).

The fact that XOR performs an inequality operation and XNOR performs equality operation is a by-product, but a valid one nonetheless. Note that it is no more remarkable then the fact that AND is modulo two multiplication and XOR is modulo two addition. You're free to use the representation that is most convenient to the task at hand. If you're programming, then converting your result into arithmetic operators makes sense.