The two laws
De Morgan's laws describe how negation distributes over AND and OR:
- ¬(A·B) = ¬A + ¬B — the negation of an AND is the OR of the negations.
- ¬(A+B) = ¬A · ¬B — the negation of an OR is the AND of the negations.
Why this matters in hardware
NAND and NOR gates are cheaper to manufacture than AND/OR gates in CMOS technology, and any Boolean function can be built using NAND gates alone (or NOR gates alone). De Morgan's laws are the tool that lets you rewrite an AND/OR/NOT expression into an equivalent NAND-only or NOR-only network.
For example, A·B is the same as ¬(¬A+¬B) — a useful identity when you only have NOR gates available, or when a fabrication process makes NOR gates significantly faster than AND gates.
A worked example
Take the expression ¬(A·B + C). Apply De Morgan's law to the outer negation first:
- ¬(A·B + C) = ¬(A·B) · ¬C
- Apply the law again to ¬(A·B): = (¬A + ¬B) · ¬C
Try it yourself
Build both versions of an expression — the original and the De Morgan-transformed one — in the circuit editor, then use the Check tool to confirm there are no floating outputs or unconnected inputs, and the Truth Table tool to confirm both versions produce identical results.