Step 1: Understanding the Concept
The XOR gate output is \(Y=A\oplus B=A\bar{B}+\bar{A}B\). It is 1 only when the inputs differ.
Step 2: Write the expected table
\(00\rightarrow0\), \(01\rightarrow1\), \(10\rightarrow1\), \(11\rightarrow0\).
Step 3: Compare the tables
Table P gives 1 for input 11, so it is an OR gate.
Tables Q and R do not match.
Table S gives 0, 1, 1, 0 which matches XOR.
Final Answer:
Table S is the truth table of the XOR gate.
\[ \boxed{\text{(D) }\text{S}} \]