A question regarding De Morgan's Law and programming with NOR conditionals

The way I understand it is that deMorgan's defines how negations are distributed in that you must also invert the operation. The use of NAND over NOR is based on the context of the particular function. It's simply just how it will be worded code-wise and whichever one makes the most sense within that context should be used. NOR is most certainly used outside of academics. Inside it's enough to just know that they're equivalent and be able to switch between them.

I think I'm still confused as to the original post. If you're asking about the language of "Neither," it would not be used with NAND in a sentence. Trying to use NAND in a sentence at all is incredibly awkward and I would probably just say something like "except when both" or maybe: "...exclusively or neither." ((A XOR B) || (!A && !B)) = (A XOR B) || !(A || B) = !(A && B) "Neither" is not only a negation but also an or operation. It pretty much means "nor" and is only used with it grammatically to make the sentence sound better. "Neither A,B nor C," is the same as "A nor B nor C." which logically translates to !(A||B||C) or (!A && !B && !C).

/r/AskProgramming Thread Parent