Which gate does the following truth table represent?

\begin{tabular}{|l|l|l|}
\hline
A & B & Output \\
\hline
0 & 0 & 0 \\
\hline
0 & 1 & 1 \\
\hline
1 & 0 & 1 \\
\hline
1 & 1 & 0 \\
\hline
\end{tabular}

A. XOR
B. OR
C. NOR
D. AND
E. NAND
F. NOT



Answer :

Let's analyze the given truth table step by step to identify which logic gate it represents:

[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \hline \end{array} \][/tex]

### Step 1: Evaluate Each Row

1. For [tex]\( A = 0 \)[/tex] and [tex]\( B = 0 \)[/tex], the output is [tex]\( 0 \)[/tex].
2. For [tex]\( A = 0 \)[/tex] and [tex]\( B = 1 \)[/tex], the output is [tex]\( 1 \)[/tex].
3. For [tex]\( A = 1 \)[/tex] and [tex]\( B = 0 \)[/tex], the output is [tex]\( 1 \)[/tex].
4. For [tex]\( A = 1 \)[/tex] and [tex]\( B = 1 \)[/tex], the output is [tex]\( 0 \)[/tex].

### Step 2: Compare With Known Logic Gates

- OR Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 1 \\ \hline \end{array} \][/tex]
The OR gate doesn't match because the output is 1 when both A and B are 1.

- AND Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 1 & 1 \\ \hline \end{array} \][/tex]
The AND gate doesn't match because the output is 1 only when both A and B are 1.

- NAND Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \hline \end{array} \][/tex]
The NAND gate doesn't match because it produces the opposite outputs where the AND gate is 1.

- NOR Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 1 & 0 \\ \hline \end{array} \][/tex]
The NOR gate doesn't match because it would output a 1 only when both inputs are 0.

- NOT Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & & \text{Output} \\ \hline 0 & & 1 \\ 1 & & 0 \\ \hline \end{array} \][/tex]
The NOT gate does not apply here since it only deals with a single input.

- XOR Gate:
[tex]\[ \begin{array}{|c|c|c|} \hline A & B & \text{Output} \\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \hline \end{array} \][/tex]
The XOR gate matches the given truth table exactly, as it produces a 1 only when the inputs are different.

### Conclusion

The given truth table represents the XOR (exclusive OR) gate. Thus, the correct answer is:

[tex]\[ \boxed{\text{XOR}} \][/tex]