Discrete MathematicsMathematical LogicLogical Equivalence and the Laws of Logic
NAND and NOR Connectives
Switching networks show how logical connectives can model physical circuits. NAND and NOR connectives take this idea further because each of them can express all the usual logical connectives. This property is important in logic design and digital circuits. In this lesson, NAND and NOR connectives will be defined, related to negation, and used to represent the basic logical connectives.
:::definition[NAND Connective]
Let p and q be statements. The connective NAND, denoted by ↑, is defined by
p↑q⇔¬(p∧q).
Thus, p↑q means that p and q are not both true.
:::
:::theorem[NAND of a Statement with Itself]
Let p be a statement. Then
p↑p⇔¬p.
:::
:::proof
Given that p↑p⇔¬(p∧p).
To prove that p↑p⇔¬p.
Using the idempotent law, p∧p⇔p. Therefore, ¬(p∧p)⇔¬p.
Hence, p↑p⇔¬p.
□
:::
:::theorem[Basic Connectives Using NAND]
Let p and q be statements. Then negation, conjunction, disjunction, implication, and biconditional can be represented using only NAND.
:::
:::proof
Given that p↑q⇔¬(p∧q).
To prove that the basic connectives can be represented using only NAND.
First, ¬p⇔p↑p. Next,
p∧q⇔¬(p↑q)⇔(p↑q)↑(p↑q).
For disjunction,
p∨q⇔(p↑p)↑(q↑q).
For implication,
p→q⇔p↑(q↑q).
Since p↔q⇔(p→q)∧(q→p), the biconditional can also be written using only NAND by substitution.
Hence, NAND is functionally complete.
□
:::
:::definition[NOR Connective]
Let p and q be statements. The connective NOR, denoted by ↓, is defined by
p↓q⇔¬(p∨q).
Thus, p↓q means that neither p nor q is true.
:::
Use the checker to compare NAND and NOR against the basic connectives they negate. NAND means not both, so it is the negation of conjunction. NOR means neither, so it is the negation of disjunction. Testing the same values of p and q makes the two special connectives easier to remember.
:::calculator[NAND and NOR Truth Checker]
Choose values and check the outputs.
:::
:::theorem[NOR of a Statement with Itself]
Let p be a statement. Then
p↓p⇔¬p.
:::
:::proof
Given that p↓p⇔¬(p∨p).
To prove that p↓p⇔¬p.
Using the idempotent law, p∨p⇔p. Therefore, ¬(p∨p)⇔¬p.
Hence, p↓p⇔¬p.
□
:::
:::theorem[Basic Connectives Using NOR]
Let p and q be statements. Then negation, conjunction, disjunction, implication, and biconditional can be represented using only NOR.
:::
:::proof
Given that p↓q⇔¬(p∨q).
To prove that the basic connectives can be represented using only NOR.
First, ¬p⇔p↓p. Next,
p∨q⇔¬(p↓q)⇔(p↓q)↓(p↓q).
For conjunction,
p∧q⇔(p↓p)↓(q↓q).
For implication,
p→q⇔[(p↓p)↓q]↓[(p↓p)↓q].
Since p↔q⇔(p→q)∧(q→p), the biconditional can also be represented using only NOR by substitution.
Hence, NOR is functionally complete.
□
:::
:::theorem[Negation Relations Between NAND and NOR]
Let p and q be statements. Then
¬(p↓q)⇔(¬p↑¬q)
and
¬(p↑q)⇔(¬p↓¬q).
:::
:::proof
Given that p and q are statements.
For the first equivalence,
¬(p↓q)⇔¬¬(p∨q)⇔p∨q.
Also,
¬p↑¬q⇔¬(¬p∧¬q)⇔p∨q.
Therefore, ¬(p↓q)⇔(¬p↑¬q).
For the second equivalence,
¬(p↑q)¬p↓¬q⇔p∧q,⇔¬(¬p∨¬q)⇔p∧q.
Hence, ¬(p↑q)⇔(¬p↓¬q).
□
:::
:::solved-problem
Represent ¬p, p∨q, p∧q, and p→q using only NAND.
:::
:::solution
Using p↑q⇔¬(p∧q),
¬pp∧qp∨qp→q⇔p↑p,⇔(p↑q)↑(p↑q),⇔(p↑p)↑(q↑q),⇔p↑(q↑q).
:::
:::solved-problem
Represent ¬p, p∨q, p∧q, and p→q using only NOR.
:::
:::solution
Using p↓q⇔¬(p∨q),
¬pp∨qp∧qp→q⇔p↓p,⇔(p↓q)↓(p↓q),⇔(p↓p)↓(q↓q),⇔[(p↓p)↓q]↓[(p↓p)↓q].
:::
:::exercise
Using only NAND, express: (1) ¬p. (2) p∧q. (3) p∨q. Using only NOR, express: (4) ¬p. (5) p∨q. (6) p∧q.
:::
:::answer
(1) p↑p. (2) (p↑q)↑(p↑q). (3) (p↑p)↑(q↑q). (4) p↓p. (5) (p↓q)↓(p↓q). (6) (p↓p)↓(q↓q).
:::
:::faq[Frequently Asked Questions]
Q: What does NAND mean?
A: NAND means not both; p↑q is equivalent to ¬(p∧q).
Q: What does NOR mean?
A: NOR means neither; p↓q is equivalent to ¬(p∨q).
Q: Why are NAND and NOR important?
A: Each can represent all basic logical connectives, so each is functionally complete.
:::
:::call-to-action[Consolidate Logical Equivalence]
subtitle: Review equivalent forms, laws of logic, simplification, switching networks, NAND, and NOR before continuing to the next section.
button: Review Section | /discrete-mathematics/mathematical-logic/logical-equivalence-and-the-laws-of-logic/equivalent-forms-of-compound-statements
button-ghost: Previous Lesson | /discrete-mathematics/mathematical-logic/logical-equivalence-and-the-laws-of-logic/switching-networks-and-logical-equivalence
:::
Switching networks show how logical connectives can model physical circuits. NAND and NOR connectives take this idea further because each of them can express all the usual logical connectives. This property is important in logic design and digital circuits. In this lesson, NAND and NOR connectives will be defined, related to negation, and used to represent the basic logical connectives.
Core definition02
NAND Connective
Let p and q be statements. The connective NAND, denoted by ↑, is defined by
p↑q⇔¬(p∧q).
Thus, p↑q means that p and q are not both true.
Key result03
NAND of a Statement with Itself
Let p be a statement. Then
p↑p⇔¬p.
Reasoning pathway04
Given that p↑p⇔¬(p∧p).
To prove that p↑p⇔¬p.
Using the idempotent law, p∧p⇔p. Therefore, ¬(p∧p)⇔¬p.
Hence, p↑p⇔¬p.
□
Key result05
Basic Connectives Using NAND
Let p and q be statements. Then negation, conjunction, disjunction, implication, and biconditional can be represented using only NAND.
Reasoning pathway06
Given that p↑q⇔¬(p∧q).
To prove that the basic connectives can be represented using only NAND.
First, ¬p⇔p↑p. Next,
p∧q⇔¬(p↑q)⇔(p↑q)↑(p↑q).
For disjunction,
p∨q⇔(p↑p)↑(q↑q).
For implication,
p→q⇔p↑(q↑q).
Since p↔q⇔(p→q)∧(q→p), the biconditional can also be written using only NAND by substitution.
Hence, NAND is functionally complete.
□
Core definition07
NOR Connective
Let p and q be statements. The connective NOR, denoted by ↓, is defined by
p↓q⇔¬(p∨q).
Thus, p↓q means that neither p nor q is true.
Use the checker to compare NAND and NOR against the basic connectives they negate. NAND means not both, so it is the negation of conjunction. NOR means neither, so it is the negation of disjunction. Testing the same values of p and q makes the two special connectives easier to remember.
Interactive calculator
NAND and NOR Truth Checker
NAND AND NOR TRUTH CHECKER
Initializing Workspace
Key result10
NOR of a Statement with Itself
Let p be a statement. Then
p↓p⇔¬p.
Reasoning pathway11
Given that p↓p⇔¬(p∨p).
To prove that p↓p⇔¬p.
Using the idempotent law, p∨p⇔p. Therefore, ¬(p∨p)⇔¬p.
Hence, p↓p⇔¬p.
□
Key result12
Basic Connectives Using NOR
Let p and q be statements. Then negation, conjunction, disjunction, implication, and biconditional can be represented using only NOR.
Reasoning pathway13
Given that p↓q⇔¬(p∨q).
To prove that the basic connectives can be represented using only NOR.
First, ¬p⇔p↓p. Next,
p∨q⇔¬(p↓q)⇔(p↓q)↓(p↓q).
For conjunction,
p∧q⇔(p↓p)↓(q↓q).
For implication,
p→q⇔[(p↓p)↓q]↓[(p↓p)↓q].
Since p↔q⇔(p→q)∧(q→p), the biconditional can also be represented using only NOR by substitution.
Hence, NOR is functionally complete.
□
Key result14
Negation Relations Between NAND and NOR
Let p and q be statements. Then
¬(p↓q)⇔(¬p↑¬q)
and
¬(p↑q)⇔(¬p↓¬q).
Reasoning pathway15
Given that p and q are statements.
For the first equivalence,
¬(p↓q)⇔¬¬(p∨q)⇔p∨q.
Also,
¬p↑¬q⇔¬(¬p∧¬q)⇔p∨q.
Therefore, ¬(p↓q)⇔(¬p↑¬q).
For the second equivalence,