GATE CS 2015 · Set-1 · Propositional Logic

MCQ · 2 marks · Problem AI-LOGIC-0082

The binary operator \(\neq\) is defined by the following truth table.\[\begin{array}{|c|c|c|} \hline p & q & p\neq q \\ \hline 0 & 0 & 0 \\ \hline 0 & 1 & 1 \\ \hline 1 & 0 & 1 \\ \hline 1 & 1 & 0 \\ \hline \end{array}\]Which one of the following is true about the binary operator \(\neq\)?
  1. A
    Both commutative and associative
  2. B
    Commutative but not associative
  3. C
    Not commutative but associative
  4. D
    Neither commutative nor associative

Solve it on GATE DA practice →More Logic problems

Show the worked solution\[\boxed{p\neq q \text{ is exclusive OR: it is } 1 \text{ exactly when } p \text{ and } q \text{ differ}}\]Commutative: the table is symmetric in \(p\) and \(q\), so \(p\neq q=q\neq p\).Associative: \((p\neq q)\neq r\) and \(p\neq(q\neq r)\) are both \(1\) exactly when an odd number of \(p, q, r\) are \(1\).Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com