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

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.

• well, it's equality because it's only true if both A and B are included. No logic discrimination happening! – KyranF Dec 18 '15 at 23:57
• @KyranF I know, I'm saying that it is in fact equality. why isn't it just called that? Like nobody refers to a XNOR gate as an EQ gate. – Steven Lu Dec 18 '15 at 23:58
• As far as I know, nobody refers to an XNOR gate at all... at least in my education and experience, it's not something that comes up. – Daniel Dec 19 '15 at 0:03
• That's an XOR gate with an inverting bubble on it... – Daniel Dec 19 '15 at 0:14
• @Daniel oh that is a good point. Hmmmm okay i guess this question doesn't really need an answer since it isn't such a great question after all – Steven Lu Dec 19 '15 at 0:21

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.

• Actually AND and XOR are pretty remarkable because they form a Boolean ring. – Fizz Dec 19 '15 at 1:17
• +1 for the notes on 1 bit mult and 1 bit add – Paebbels Dec 19 '15 at 1:20

I disagree with the accepted answer that "XNOR performs equality operation is a by-product". Although you cannot expect more than uninformed upvotes for this statement on a EE site (you should have really asked on Math.SE if you expected that), in math or logic contexts it is more likely to be called a biconditional (that's because equality in a logic context is equivalent with if and only if); You can find that in several math or CS textbooks which don't even mention xnor:

Others call it just equivalence:

It's usually only when you get to circuit engineering books that you usually start to encounter the xnor terminology:

Some of these engineering books call it concidence [gate] as well (or say it implements the coincidence function), although they have a preference for xnor, no doubt.

And some engineering books call it equivalence in addition to xnor

So it depends who (or where) you ask. I haven't found this written explicitly somewhere, but I think the established symbol for the xnor gate being generally used only in circuit contexts and being absent in more abstract math/logic contexts facilitates this terminology divergence. Furthermore, there are introductory logic texts that don't even mention xor [thus calling something xnor would be a big huh for the students]; for example Suppes explicitly refutes the need to introduce a symbol for xor in his introductory logic textbook. But it's hard to discuss logic without ever getting to equivalence (iff aka biconditional).

As an aside, perhaps if Latin were Suppes' [or other logician's] first language, he/they would be more inclined to accept [something like] xor, because (quoting from Copi's textbook): "Although disjunctions are expressed ambiguously in English, they are unambiguous in Latin. ... The Latin word "vel" expresses weak or inclusive disjunction, and the Latin word "aut" corresponds to the word "or" in its strong or exclusive sense." This uniform interpretation of Latin is disputed by others though because aut in negated sentences like neo timebat tribunos aut plebes "no one feared the magistrates [x]or the mob" doesn't sound genuine with aut interpreted as xor instead of or because then you can read that as allowing for "everyone feared both the magistrates and the mob" as being possibly true.

• I don't see how your answer disagrees. As you correctly state, xnor is equivalent to a biconditional/equivalence/coincidence/equality operation in other fields. But that's just a consequence of working through the logic. Perhaps it would be clearer to replace "by-product" with "coincidence" or "happenstance"? English is tricky... – Heath Raftery Dec 23 '15 at 23:45

It would make more sense to have the biconditional gate be the normal one and the XOR be the negated one. That way we could have IFF and NIFF gates. However, what I wonder is why we go with XNOR instead of NXOR since the latter is much easier to say (ex-nor vs. nexor) and more descriptive of the situation. Exclusive nor by this description is equivalent to an exclusive or, which would imply that the gate isn't any different.

Fundamentally, the answer to your question is a historical one and not a mathematical one. If George Boole thought the concept of "fundamental logical operations" was best described by "negation", "conjunction" and "If and only if" (equality) and everything else could be described as combinations of those fundamentals then the term for XNOR would be NIFF in modern Boolean algebra (since that is a functionally complete set). Because, instead, George Boole felt that "negation", "conjunction" and "disjunction" were a fundamental set we derive terms from that set.

But another issue is the confusion caused by the name XNOR being used instead of NXOR since XNOR is calculated as NOT(a XOR b). People often say it's because XNOR is easier to say, I'm not sure, "nexor" is just fine for me. But, more confusingly, people also sometimes say that it is more congruent with XOR and that we can think of NOR as fundamental, meaning "neither" in English (people don't always make this association). And XNOR means "exclusive neither". I have no idea how you apply the word "exclusive" to the word "neither" using either dictionary definitions of the adjective form of "exclusive". This is an unfortunate confusion and I wish we used NXOR or just updated Boolean Algebra to add IFF and NIFF so that the derivation of the terms were congruent with NAND and NOR.