# Boolean Algebra - Why does (x'y' + x'y + xy' + xy) = 1

Have the answers to my Design Fundamentals homework but I do not know how they got the answer they did without $(x'y' + x'y + xy' + xy)$ equaling $1$.

Thanks

• Nevermind, got it. x'(y' + y) + x(y' + y) //y' + y = 1 && x' + x = 1 – Blake Thomson Sep 9 '14 at 1:11

Notice that if x and y are the same, then the two middle terms will cancel out. If they're both 0, then the first term will be 1, and if they're both 1, then the last term will be 1. If x and y are different, then the first and last terms will cancel out, but one of the middle terms will end up being 0'1 = 1. As long as one term equals 1, the expression will equal 1.

If you ever want to convince yourself of any relation, draw a Karnaugh map or a truth table:

xy x'y' x'y y'x yx
00  1    0   0   0
01  0    1   0   0
10  0    0   1   0
11  0    0   0   1


Therefore no matter what x and y are, one term in your sum of products is always 1.

By applying distribution we have a conjunction of two disjunctions of complements. \begin{align}x'y'+xy'+x'y+xy & = (x'+x)y'+(x'+x)y \\ & = (x'+x)(y'+y) \\ & = 1\times 1 \\ & = 1\end{align}