I am working on simplifying the expression f = x'yz + xy'z + xyz' + xyz
. Actually, it may not be this expression. The question is: simplify the boolean expression for a voting system, the system being: three people vote on multiple candidates, and two or more people should agree(true) on the candidate in order to pass. So I think the answer would be xy + yz + xz
, but I can't figure out the process between. Can anyone explain?

- 9,922
- 1
- 40
- 48

- 17
- 1
- 1
- 6
-
Is the diagram the answer or question? Where are you stuck? – shree.pat18 Apr 01 '19 at 09:33
-
1tl;dr: i can't figure out why x'yz + xy'z + xyz' + xyz = xy + yz + xz (edit: english isn't my first language so excuse me if it was hard to understand what i meant) – Alex Apr 01 '19 at 09:45
2 Answers
From the idempotent/identity law, we have x + x = x
, and so xyz + xyz = xyz
. Applying this principle, we can rewrite your expression as:
f = x'yz + xy'z + xyz' + xyz
=> f = x'yz + xy'z + xyz' + xyz + xyz + xyz --OR with xyz twice without affecting the value
=> f = x'yz + xyz + xy'z + xyz + xyz' + xyz --Rearrange
=> f = yz (x + x') + xz (y + y') + xy(z' + z) --Group
=> f = yz + xz + xy --Since x+x' = 1
That said, as the diagram clearly shows, you can simply take AND together each pair of inputs, and OR them together to get the same result. By doing this, you ensure that:
- If any 2 of the 3 inputs are true, your overall result is true
- When all 3 are true, the result is still true
The advantage of expressing it in this way is that you can just focus on each pair of inputs at one time, without worrying about the impact of the third one.

- 21,449
- 3
- 43
- 63
-
wow i didn't think about approaching it that way! all the results i found online included changing something to an xor/xnor expression and i was really confused. thanks, this is much easier to understand! – Alex Apr 01 '19 at 10:28
A simple way without involved logical reasoning
Write a truth table. For three inputs, there are 2^3 = 8 rows.
Four rows correspond to the given terms in your sum-of-products expression.
Enter the eight values of your expression into a Karnaugh map:
Group adjacent 1-terms to blocks as shown. A pair of cells can be merged into a bigger block, if they just differ in one input. This way, the blocks double their cell-count and reduce their input-count by one in every merge step.
Each of the resulting blocks corresponds to one implicant term in the minimized expression.
Drawing the map and finding the blocks can be done automatically using a nice online tool of Marburg University.

- 10,544
- 2
- 31
- 54