De Morgan's laws

De_Morgan's laws (or De_Morgan's theorems) are used to simplify the Boolean expressions.

There are two theorems: Note that this theorems are true in both direction
 * 1) The complement of two or more AND variables is equal to the OR of the complements of each variable. $$\overline{xy}=\bar x + \bar y$$
 * 2) The complement of two or more OR variables is equal to the AND of the complements of each variable. $$\overline{x+y}=\bar x \bar y$$

Examples

 * $$\overline{xyz}=\bar x+\bar y +\bar z$$


 * $$\overline{x+y+z}=\bar x\bar y \bar z$$


 * Note that x can be a combination of other variables.

lets say $$x=(A+B)$$ and $$y=(C+D)$$ so:
 * $$\overline{xy}=\bar{x}+\bar{y}$$

will be:
 * $$\overline{(A+B)(C+D)}=\overline{(A+B)}+\overline{(C+D)}=\bar{A}\bar{B}+\bar{C}\bar{D}$$


 * In case we have more than one livile bar (or complement or negate) start with the top bar first
 * $$\overline{\overline{(A+B)}+\overline{(C+D)}}=\overline{\overline{(A+B)}}.\overline{\overline{(C+D)}}=(A+B)(C+D)$$

Note that $$\overline{\overline{A}}=A$$ Boolean rule.


 * $$\overline{\overline{ABC}+D+E}=\overline{\overline{ABC}}\bar D\bar E=ABC\bar D\bar E$$


 * $$\overline{(A+B)\bar{C}+D+\bar{E}}=(\overline{(A+B)\bar{C})}\bar{D}\overline{\overline{E}}=(\overline{(A+B)}+\overline{\overline{C}})\bar{D}E=(\bar{A}\bar{B}+C)\bar{D}E$$