The correct option is D Both (a) and (b)
From the circuit diagram, we deduce that LED will glow when Z = low (0) and Z will be low only when X or Y or both will be high. Now, we consider the different input conditions as
1. For A = B = 1 ;
X = 1 and Y = 0
⇒ Z = 0 ; LED glows
2. For A = B = 0 ;
X = 0 and Y =1
⇒ Z = 0 ; LED glows
3. For A = 0, B = 1 ;
X = 0 and Y = 0
⇒ Z = 1 ; LED does not glows
4. For A =1, B = 0 ;
X = 0 and Y =0
⇒ Z = 1 ; LED does not glows