Boolean Identities

In the example below, we simplify the expression $(x+y)z'+x$ that we worked with on one of the previous slides:

$\begin{align*}(x+y)z'+x &= xz' + yz' + x \text{ [Distributive Law: $(a+b)c = ac + bc$]}\\&= yz' + xz' + x \text{ [Commutative Law: $a + b = b + a$]}\\&=yz' + x \text{ [Absorption Law: $ab + a = a$]}\end{align*}$

This means that, instead of saying "We can drink coffee or tea and not eat any donuts, or just drink coffee," we could just say: "We can drink tea without eating any donuts, or just drink coffee," and still mean the same thing!

You can always use the following super-handy online expression simplifier whenever you want to know if a certain expression that you write in your if, while, etc., statement can be simplified (which will make your programs run faster!) https://www.boolean-algebra.com/.