Use the logic truth table in figure 3 to answer question   X Y Z 0…