Figure gives a system of logic gates. From the study of truth table it can be found that to produce a high output (1) at R, we must have
The truth table can be written as
XY¯¯¯¯¯X¯¯¯¯YP=¯¯¯¯¯X+YQ=¯¯¯¯¯¯¯¯¯¯¯X.¯¯¯¯YR=¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯P+Q0110110110011010010010011110
Hence X=1, Y=0 gives output R=1