A-level Computing/AQA/Paper 2/Fundamentals of computer systems/De Morgan's Laws
De Morgan's laws are used to simplify Boolean equations so that you can build equations only involving one sort of gate, generally only using NAND or NOR gates. This can lead to cheaper hardware. There are two laws that you need to remember:
Template:CPTRuleTab
| Rule 1 | Rule 2 |
|---|
Template:CPTRuleEnd An easy way to remember De Morgan's Laws is through the rhyme: "break the line, change the sign"!
Let's prove that I'm not lying to you by creating a truth table to prove that: Template:Nowrap
Now we prove Template:Nowrap by the same method: Template:CPTAnswer There is a rather nice concrete way of thinking about this, with a gate that's padlocked with two padlocks, padlock 1 and padlock 2.
We'll use to stand for padlock 1 is open, and to stand for padlock 2 is open.
You can go through the gate if padlock 1 is open AND padlock 2 is open () You can not go through the gate if padlock 1 is locked OR padlock 2 is locked ()
Since 'You can not go through the gate' is the same as the opposite (negation) of 'You can go through the gate' and, remembering
gate is open = gate is closed = you should be able to see that NOT{gate is open} = or
= Template:CPTExample Simplify the following:
| 0 | 0 | |||||
| 0 | 1 | |||||
| 1 | 0 | |||||
| 1 | 1 |
From looking at the truth table we can see that it equates to . But we should also know how to get to this result by using boolean identities. Let's give it a go:
- Using De Morgans Law: . Where P = and Q =
- Take each side separately and applying De Morgans Law convert the centre gate to an AND:
- Now dealing with the left hand side of our new equation (), apply De Morgans Law again () and cancel out the double bars:
- Multiply out both sides:
- From the Identity we can replace the left hand side:
- From the Identity we can ignore the 0 leaving us with:
- From the Identity we can swap the values around:
= the value we calculated by truth table
Let's try another Template:Robox/Close
Template:CPTExercise Template:CPTQuestionTabSimplify the following using De Morgan's Laws and boolean identities. Check your answers by making truth tables:
Template:CPTQuestionTabEnd Template:CPTAnswerTab
- Using Demorgans rule that:
- Making
- Using the boolean identity that
- Making
- Using the boolean identity that
- We simplify down to
Template:CPTQuestion Template:CPTAnswer Template:CPTQuestion Template:CPTAnswer