Question

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

f(w,0,0,z)=1f(1,x,1,z)=x+zf(w,1,y,z)=wz+y\begin{aligned} f(w, 0, 0, z) &= 1 \\ f(1, x, 1, z) &= x + z \\ f(w, 1, y, z) &= wz + y \end{aligned}

The number of literals in the minimal sum-of-products expression of ff is ______.

Official answer and solution
Official answer
6
From
Official GATE 2021 answer key

Solution

Determine the minterm values from the given functional constraints, construct the 4-variable Karnaugh map, and find the minimal Sum-of-Products (SOP) expression.

We are given three constraints on the 4-variable function f(w,x,y,z)f(w, x, y, z):

  1. f(w,0,0,z)=1f(w, 0, 0, z) = 1:
    For x=0,y=0x=0, y=0, the function is 1 for all w,zw, z. This gives minterms:
    m0(0000)=1,m1(0001)=1,m8(1000)=1,m9(1001)=1m_0(0000) = 1, m_1(0001) = 1, m_8(1000) = 1, m_9(1001) = 1.
  1. f(w,1,y,z)=wz+yf(w, 1, y, z) = wz + y:
    For x=1x=1:
    • If y=1y=1, wz+1=1wz + 1 = 1: minterms m6(0110),m7(0111),m14(1110),m15(1111)m_6(0110), m_7(0111), m_{14}(1110), m_{15}(1111) are all 1.
    • If y=0y=0, wz+0=wzwz + 0 = wz: m13(1101)=1m_{13}(1101) = 1, and m4(0100)=0,m5(0101)=0,m12(1100)=0m_4(0100) = 0, m_5(0101) = 0, m_{12}(1100) = 0.
  1. f(1,x,1,z)=x+zf(1, x, 1, z) = x + z:
    For w=1,y=1w=1, y=1:
    • If x=1x=1, 1+z=11 + z = 1 (consistent with m14,m15=1m_{14}, m_{15} = 1).
    • If x=0x=0, 0+z=z0 + z = z: m11(1011)=1m_{11}(1011) = 1, and m10(1010)=0m_{10}(1010) = 0.
  1. Minimizing on the K-map:
    • Group 1: m0,m1,m8,m9m_0, m_1, m_8, m_9 forms a 4-cell group covering x=0,y=0x=0, y=0, which gives x‾ y‾\overline{x}\,\overline{y} (2 literals).
    • Group 2: m6,m7,m14,m15m_6, m_7, m_{14}, m_{15} forms a 4-cell group covering x=1,y=1x=1, y=1, which gives xyxy (2 literals).
    • Group 3: The remaining 1-minterms m9,m11,m13,m15m_9, m_{11}, m_{13}, m_{15} form a 4-cell group covering w=1,z=1w=1, z=1, which gives wzwz (2 literals).
      The minimal SOP expression is:
    f(w,x,y,z)=x‾ y‾+xy+wzf(w, x, y, z) = \overline{x}\,\overline{y} + xy + wz

Counting literals: each of the three product terms contains 2 literals, giving a total of 2+2+2=62 + 2 + 2 = 6 literals.

Final answer

6

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
Question
62 of 65, printed as CS Q.52
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.