The Gateway to Computer Science Excellence
+17 votes

The binary operator $\neq$ 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 $\neq$ ?

  1. Both commutative and associative
  2. Commutative but not associative
  3. Not commutative but associative
  4. Neither commutative nor associative
in Set Theory & Algebra by Boss (30.8k points)
edited by | 1.8k views

2 Answers

+21 votes
Best answer
option A :  as it is XOR operation
by Active (1.2k points)
selected by

p=0 q=1 r=0

p ≠ q => 0≠ 1 => 1
q ≠ p => 1≠ 0 =>1     

p≠(q≠r)  => 0≠(1≠0) =>0≠1 =>1
(p≠q)≠r  => (0≠1)≠0 => 1≠0 => 1

Although this works fine here but you can not say # is commutative/Associative by just taking a single input combination.
To say associative it should be true for all cases ..we can  check that by putting one of the variable as 0 and 1
+6 votes

The binary operator ≠ is EXOR (⊕) operator.And  EXOR (⊕) operator is Commutative as well as Associative.

The correct answer is (A)Both commutative and associative

by Loyal (8k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,306 answers
105,012 users