You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
De Morgan's laws are the two rules that the basic Boolean laws cannot give you: how to break a bar that sits over a compound expression. Every law in the previous lesson — identity, complement, distributive and the rest — leaves a long overbar like A+B untouched, because none of them says what NOT does to an AND or an OR underneath it. De Morgan's laws fill exactly that gap, and in doing so they unlock gate-type conversion (AND/OR/NOT ⟷ NAND/NOR), bubble-pushing in circuit diagrams, and the simplification of any expression containing a "long bar". The OCR H446 specification names them explicitly and expects you to both state and apply them.
The two laws are usually attributed to the 19th-century logician Augustus De Morgan, who formalised them as principles of logic; they apply identically to set theory (complement of a union/intersection) and to the propositional logic you may meet elsewhere. In this course we treat them as Boolean-algebra rules, but their reach across mathematics is part of why they are considered fundamental.
Why do they earn a lesson of their own when they are "only" two more rules? Because they are the hinge of the whole topic. The basic laws of the previous lesson can rearrange, factor and collapse an expression, but they are powerless against a NOT that spans an entire sub-expression — and such "long bars" appear the instant you write down a NAND, a NOR, or the complement of any compound condition. De Morgan's laws are the only tool that moves a complement through an AND or OR. Master them and you can: simplify any expression no matter how the bars are arranged; convert freely between the AND/OR/NOT world programmers think in and the NAND/NOR world silicon is built from; and refactor negated boolean conditions in code without changing behaviour. That breadth of consequence is why they sit at the centre of 1.4.3.
This lesson covers the De Morgan strand of OCR H446 section 1.4.3 (Boolean algebra):
It depends on the basic-laws lesson (especially double negation and the distributive law) and feeds directly into the simplification and circuit-design lessons, where De Morgan's is one of the most frequently used moves.
De Morgan's First Law:
A⋅B=A+B
De Morgan's Second Law:
A+B=A⋅B
In words:
The single sentence that captures both: "break the bar, swap the operator." When a NOT covering a whole AND/OR is split across the two terms, the bar shortens onto each term individually and the connecting operator flips (AND↔OR).
The laws are not arbitrary symbol-shuffling; they encode plain reasoning.
First law — A⋅B=A+B: "It is not true that both A and B hold" means "at least one of them fails" — i.e. A is false or B is false. To deny that two conditions are both met, you only need one of them to be unmet.
Second law — A+B=A⋅B: "It is not true that A or B holds" means "neither holds" — i.e. A is false and B is false. To deny that at least one condition is met, every condition must be unmet. This is the stronger of the two negations: "neither" rules out three of the four input rows, leaving only the all-zero case, which is exactly why the proved column for the second law has a single 1.
A real-world anchor: "you may not have cake and ice cream" (a denied AND) means "you can't have cake, or you can't have ice cream — at least one is off the menu", whereas "there is no tea or coffee" (a denied OR) means "there is no tea and no coffee". The everyday slipperiness of "and"/"or" under negation is exactly what De Morgan's laws pin down precisely.
It is worth noticing why a naive guess fails. A beginner who meets A⋅B for the first time often writes A⋅B — keeping the AND and just barring each variable. The truth table exposes the error instantly: at A=1,B=0 the original A⋅B=0=1, but the naive A⋅B=0⋅1=0. They disagree, so the guess is wrong. The operator must flip because "not both" is a much weaker condition than "neither" — "not both true" is satisfied by three of the four input rows, whereas "neither true" is satisfied by only one. Internalising that asymmetry is the surest defence against the most common De Morgan slip.
| A | B | A⋅B | A⋅B | A | B | A+B |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
The A⋅B column and the A+B column are identical — (1,1,1,0) — so the law holds. All four input cases agree, leaving nothing unchecked: this is a complete proof, not merely supporting evidence.
Notice that the proved column (1,1,1,0) is precisely the NAND truth table — which makes sense, since A⋅B is NAND. So De Morgan's first law can be read as the statement "a NAND gate behaves identically to an OR gate fed by two inverters", a fact you can use to swap one realisation for the other in any circuit. This is the bridge between the algebraic law and the hardware equivalence developed later under bubble-pushing.
| A | B | A+B | A+B | A | B | A⋅B |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
The A+B column and the A⋅B column are identical — (1,0,0,0) — so the second law is likewise proved. As before, the proved column (1,0,0,0) is the NOR truth table, so the second law states "a NOR gate behaves identically to an AND gate fed by two inverters". The symmetry between the two proofs is itself an instance of the duality principle: swap AND for OR and 0 for 1 throughout the first proof and you obtain the second.
The mechanical procedure for one application:
| Original | Break the bar onto each term | Swap the operator | Result |
|---|---|---|---|
| A⋅B | A □ B | AND → OR | A+B |
| A+B | A □ B | OR → AND | A⋅B |
A vital subtlety: when you break a bar, any term that was already complemented gets a second bar, which double negation then removes. For example A⋅B=A+B=A+B — the bar over A becomes a double bar and cancels.
A reliable mental routine for any single application is three words: bar, swap, negate. Bar — shorten the long bar so it lands on each term individually. Swap — flip the operator that joins them (AND↔OR). Negate — make sure each term now carries its own complement, then immediately cancel any double bar this produced. Saying the routine to yourself on each step prevents the two classic errors (swapping without breaking, or breaking without swapping) because both moves are forced by the sequence. Once a long bar has more than two terms or contains nested compounds, you simply repeat the routine, always tackling the outermost surviving bar first.
The laws extend to any number of variables. Apply them repeatedly, or use the generalised form directly:
A⋅B⋅C=A+B+C
A+B+C=A⋅B⋅C
The rule is unchanged: complement every variable and swap every connecting operator. A clean way to handle a three-variable case formally is to bracket two of the variables first — A⋅B⋅C=(A⋅B)⋅C=A⋅B+C=(A+B)+C — using the law twice. The generalised form is just the shortcut for that repeated application.
This generalisation has a tidy interpretation. The first law says "NOT (all of them) = (at least one is not)": denying that every condition holds is the same as asserting some condition fails. The second says "NOT (any of them) = (all of them are not)": denying that any condition holds means every condition fails. Phrased that way, the laws scale to any number of inputs without memorisation — they are simply the precise statements of "not all" and "not any". In a multi-input NAND or NOR gate, this is exactly the behaviour: a wide NAND outputs 0 only when every input is 1 (so its complement, the AND, needs all-ones), and a wide NOR outputs 1 only when every input is 0.
Example 1 — Simplify A⋅B.
A⋅B=A+B[De Morgan 1st] =A+B[double negation]
Example 2 — Simplify (A+B)⋅C.
(A+B)⋅C=(A+B)+C[De Morgan 1st, on the outer AND] =(A⋅B)+C[De Morgan 2nd, on A+B]
Example 3 — Simplify A⋅(B+C).
A⋅(B+C)=A+(B+C)[De Morgan 1st] =A+(B⋅C)[De Morgan 2nd]
The pattern across all three: work outermost bar first, then drill inward, applying the appropriate law at each layer and cleaning up double bars as they appear.
Example 4 — a two-layer case worth slowing down on: simplify A⋅B+C. The outermost bar spans an OR ((…)+C), so the second law fires first:
A⋅B+C=A⋅B⋅C[De Morgan 2nd] =(A⋅B)⋅C[double negation on A⋅B] =A⋅B⋅C[associative]
The key decision was reading the outermost operator correctly: it is the OR joining A⋅B to C, not the inner AND. Candidates who dive at the inner A⋅B first end up with a tangle. Identify what the top-level bar actually covers, choose the matching law (first for a top-level AND, second for a top-level OR), and only then descend.
De Morgan's laws are the algebraic basis for converting circuits between gate families, often visualised as "pushing inversion bubbles" through a gate.
| Realisation | Expression | De Morgan equivalent |
|---|---|---|
| NAND | A⋅B | A+B — two inverters feeding an OR |
| NOR | A+B | A⋅B — two inverters feeding an AND |
Read the first row visually: a NAND gate (an AND with an output bubble) is equivalent to an OR gate with bubbles on both inputs. Pushing the output bubble back through the gate flips the gate symbol (AND↔OR) and moves a bubble onto each input — which is De Morgan's first law drawn rather than written.
flowchart LR
subgraph NAND_view["NAND: output bubble on an AND"]
A1["A"] --> AND["AND + output bubble"]
B1["B"] --> AND
AND --> Q1["Q"]
end
subgraph OR_view["Equivalent: input bubbles on an OR"]
A2["A"] --> NA["NOT"]
B2["B"] --> NB["NOT"]
NA --> OR["OR"]
NB --> OR
OR --> Q2["Q"]
end
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.