Cs · Computer Science

How to Simplify X'YZ + XY'Z + XYZ'

Published By the 9to5Science editorial team

At a glance

  1. 1. Read the operators

    Treat an apostrophe as NOT, juxtaposition as AND, and plus as OR.

  2. 2. Check the true cases

    Each product is true when exactly two of X, Y, and Z are true.

  3. 3. Choose a form

    Keep the expression for minimal sum-of-products, or factor it using XOR for a compact alternative.

Try it: Boolean simplifier calculator

The expression uses the usual Boolean-logic conventions: an apostrophe means NOT, juxtaposition means AND, and plus means OR. Here, each of the three product terms describes one specific combination of input values.

The expression is true when exactly two of XX, YY, and ZZ are true. Its given sum-of-products form is already minimal if you are restricted to AND, OR, and NOT gates. You can write it more compactly if XOR is allowed.

Read each term

A product term is true only when all its literals are true:

  • X′YZX'YZ means X=0X=0, Y=1Y=1, and Z=1Z=1.
  • XY′ZXY'Z means X=1X=1, Y=0Y=0, and Z=1Z=1.
  • XYZ′XYZ' means X=1X=1, Y=1Y=1, and Z=0Z=0.

The plus signs OR these cases together. So the output is 1 for inputs 011, 101, and 110—precisely the inputs with two 1s.

Equivalent forms

If XOR is available, combine the first two terms by factoring out ZZ:

X′YZ+XY′Z+XYZ′=Z(X′Y+XY′)+XYZ′=Z(X⊕Y)+XYZ′.\begin{aligned} X'YZ + XY'Z + XYZ' &= Z(X'Y + XY') + XYZ' \\ &= Z(X \oplus Y) + XYZ'. \end{aligned}

Here, X⊕YX \oplus Y is true when exactly one of XX and YY is true. When Z=1Z=1, the first part selects cases where exactly one of X,YX,Y is true. When Z=0Z=0, the second part selects the case X=Y=1X=Y=1.

Another description is “at least two inputs are true, but not all three.” In Boolean notation, that is (XY+XZ+YZ)(X′+Y′+Z′)(XY+XZ+YZ)(X'+Y'+Z'). The first factor requires at least one pair of true inputs; the second excludes the all-true case.

Worked example

Take X=1X=1, Y=1Y=1, and Z=0Z=0. Substituting into the original expression gives

(0)(1)(0)+(1)(0)(0)+(1)(1)(1)=1.(0)(1)(0) + (1)(0)(0) + (1)(1)(1) = 1.

Thus the output is 1, as expected: exactly two inputs are true. For comparison, at X=Y=Z=1X=Y=Z=1, every term in the original expression is 0, so the output is 0.

XXYYZZOutput
0111
1011
1101
Other inputs0

Why the sum-of-products form is minimal

The three true input combinations—011, 101, and 110—are pairwise different in two positions. In a three-variable Karnaugh map, none of these 1s is adjacent to another 1, so none can be combined into a larger group. Each minterm therefore needs its own three-literal product term in a minimal sum-of-products implementation.

The XOR form may use fewer symbols, but it assumes an XOR operation is permitted as a building block. If your allowed operators are only NOT, AND, and OR, use the original expression.

Common mistakes

  • Confusing this with 3-input XOR. A 3-input XOR is true when an odd number of inputs are true: one or three. This expression is true when exactly two are true.
  • Dropping a complement. For example, X′YZX'YZ requires X=0X=0, not X=1X=1.
  • Treating plus as arithmetic addition. In Boolean algebra, 1+1=11+1=1 because plus means OR, not ordinary integer addition.

References

  1. Digital Design, M. Morris Mano and Michael D. Ciletti

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.