CACTUSPEAR.ORG PRESENTS

the nand and nor operators

The nand (short for "not and") gate is a favorite of computer hardward designers. This is because all of the other logical operations (negation, or, and, implication) can be achieved using only nand gates. Microprocessor chips can therefore be built with only one kind of gate.

Let NAND(A,B) stand for the logical statement ¬(A∧B).

Then NAND(A,A) ⇔ ¬(A∧A) ⇔ ¬A.

NAND[NAND(A,A), NAND(B,B)] ⇔ NAND(¬A,¬B) ⇔ ¬(¬A&¬B) ⇔ A ∨ B.

NAND[NAND(A,B), NAND(A,B)] ⇔ ¬NAND(A,B) ⇔ A ∧ B.

NAND[A, NAND(B,B)] ⇔ NAND(A, ¬B) ⇔ ¬(A∧¬B) ⇔ ¬A ∨ B ⇔ A ⇒ B.

Note: The nor ("not or") operator can accomplish the same task, although achieving implication requires an extra step.

Let NOR(A,B) stand for the statement ¬(A∨B).

Then NOR(A,A) ⇔ ¬(A∨A) ⇔ ¬A.

NOR[NOR(A,B), NOR(A,B)] ⇔ ¬NOR(A,B) ⇔ A ∨ B.

NOR[NOR(A,A), NOR(B,B)] ⇔ NOR(¬A, ¬B) ⇔ ¬(¬A ∨ ¬B) ⇔ A ∧ B.

NOR{NOR[NOR(A,A), B], NOR[NOR(A,A), B]} ⇔ ¬NOR[NOR(A,A), B] ⇔ ¬A ∨ B ⇔ A ⇒ B.


cactuspear home
comments to comments at cactuspear dot org