Consider a Boolean function \( f(w,x,y,z)\) such that <span…

2021

Consider a Boolean function \( f(w,x,y,z)\) such that

<span class="mathjax-latex">\(\begin{array}{lll} f(w,0,0,z) & = & 1 \\ f(1,x,1,z) & =& x+z \\ f(w,1,y,z) & = & wz +y \end{array}\)</span>

The number of literals in the minimal sum-of-products expression of \(f\) is _________ .

Attempted by 110 students.

Show answer & explanation

Correct answer: 6

Key idea: use the given restrictions to list mandatory 1s and then find prime implicants (treat unspecified cells as don't-cares if useful).

  • From f(w,0,0,z)=1: all minterms with x=0,y=0 are 1 (4 ones).

  • From f(w,1,y,z)=wz+y (for x=1): when x=1,y=1 all minterms are 1 (4 ones); when x=1,y=0 only the minterm w=1,z=1 is 1.

  • From f(1,x,1,z)=x+z (w=1,y=1): the case w=1,x=0,y=1 gives 1 only when z=1, and gives 0 when z=0. This fixes those values consistently with the above.

  • Putting these together yields 10 mandatory ones and 2 unspecified cells (don't-cares).

  • Find prime implicants that cover all required ones (using the don't-cares if helpful):

  • x' y' covers all minterms with x=0,y=0 (4 ones).

  • x y covers all minterms with x=1,y=1 (4 ones).

  • w z covers all minterms with w=1,z=1 (this includes the remaining required ones at x=0,y=1 and x=1,y=0 and others already required).

Thus a minimal sum-of-products is: f = x' y' + x y + w z

Literal count: each product has 2 literals, and there are 3 products, so the minimal sum-of-products expression has 6 literals.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir