The binary operator ≠ is defined by the following truth table.…
2015
The binary operator ≠ is defined by the following truth table.
\(\begin{array}{|l|l|l|} \hline \textbf{p} & \textbf{q}& \textbf{p} \neq \textbf{q}\\\hline \text{0} & \text{0}& \text{0}\\\hline \text{0} & \text{1}& \text{1}\\\hline \text{1} & \text{0}& \text{1}\\\hline \text{1} & \text{1}& \text{0}\\\hline \end{array}\)
Which one of the following is true about the binary operator ≠?
- A.
Both commutative and associative
- B.
Commutative but not associative
- C.
Not commutative but associative
- D.
Neither commutative nor associative
Attempted by 141 students.
Show answer & explanation
Correct answer: A
Key insight: ≠ is the exclusive OR (XOR) operator: it is true exactly when an odd number of inputs are true.
Commutative — the truth table is symmetric, so p ≠ q and q ≠ p have the same value for every input pair.
Associative — interpret true as 1 and false as 0. Then p ≠ q corresponds to p + q (mod 2). Addition mod 2 is associative, so (p ≠ q) ≠ r and p ≠ (q ≠ r) both equal p + q + r (mod 2).
Therefore, the operator ≠ is both commutative and associative.
A video solution is available for this question — log in and enroll to watch it.