A-level Computing 2009/AQA/Computer Components, The Stored Program Concept and the Internet/Fundamental Hardware Elements of Computers/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:

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: $\overline{P + Q} = \overline{P}.\overline{Q}$

Now we prove $\overline{P. Q} = \overline{P}+\overline{Q}$ by the same method:

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 $$P$$ to stand for padlock 1 is open, and $$Q$$ to stand for padlock 2 is open.

You can go through the gate if padlock 1 is open AND padlock 2 is open ($$P . Q$$) You can not go through the gate if padlock 1 is locked OR padlock 2 is locked ($$\overline{P} + \overline{Q}$$)

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 		= $$P.Q$$ gate is closed		= $$\overline{P} + \overline{Q}$$ you should be able to see that NOT{gate is open}	= $$\overline{P} + \overline{Q}$$ or

$$\overline{P. Q}$$		= $$\overline{P} + \overline{Q}$$

Simplify the following: $$\overline{(A . \overline{B})+\overline{A}}$$ From looking at the truth table we can see that it equates to $$A.B$$. But we should also know how to get to this result by using boolean identities. Let's give it a go: $$\overline{(A . \overline{B})+(\overline{A})} = (\overline{A . \overline{B}}).(\overline{\overline{A}}) $$ $$(\overline{\overline{\overline{A} + \overline{\overline{B}}}}).({A}) = (\overline{A} + {B}).({A})$$ $$(\overline{A}.A) + (B.A)$$ $$0 + (B.A)$$ $$B.A$$ $$A.B$$ = the value we calculated by truth table
 * 1) Using De Morgans Law: $$\overline{P + Q} = \overline{P}.\overline{Q}$$. Where P = $$(A . \overline{B})$$ and Q = $$(\overline{A})$$
 * 2) Take each side separately and applying De Morgans Law convert the centre gate to an AND:
 * 1) Now dealing with the left hand side of our new equation ($$\overline{A . \overline{B}}$$), apply De Morgans Law again ($$\overline{P . Q} == \overline{P}+\overline{Q}$$) and cancel out the double bars:
 * 1) Multiply out both sides:
 * 1) From the Identity $$\overline{A}.A = 0$$ we can replace the left hand side:
 * 1) From the Identity $$0 + X = X$$ we can ignore the 0 leaving us with:
 * 1) From the Identity $$X.Y = Y.X$$ we can swap the values around:

Let's try another

Simplify the following using De Morgan's Laws and boolean identities. Check your answers by making truth tables:

$$\overline{A. B}+A$$


 * 1) Using Demorgans rule that: $$\overline{A . B} = \overline{A}+\overline{B}$$
 * 2) Making $$\overline{A . B}+A = \overline{A}+\overline{B}+A$$
 * 3) Using the boolean identity that $$\overline{A}+A = 1$$
 * 4) Making $$\overline{A}+\overline{B}+A = \overline{B}+1$$
 * 5) Using the boolean identity that $$\overline{B}+1 = 1$$
 * 6) We simplify down to $$\overline{A . B} + A == 1$$