GATE / CS ARCHIVE

GATE CSE 2015 SET 1 / QUESTION 40

GATE CSE 2015 Set 1 Q40

Digital Logic · Boolean Algebra & Logic Gates · Full GATE CSE 2015 Set 1 paper

GATE 2015 Set 1, Q40 2 marks · MCQ
Report issue

Boolean Algebra & Logic Gates

Question 40, GATE 2015: Binary operator ≠ has truth table (p,q,result): (0,0,0),(0,1,1),(1,0,1),(1,1,0). Which properties hold? A commutative and associative; B commutative only; C associative only; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Recognize XOR, which is addition modulo 2. Swapping its two inputs preserves their sum modulo 2, proving commutativity. Grouping three inputs either way gives (p+q+r) mod 2, proving associativity. A truth table for only two inputs can show commutativity directly, but associativity needs the three-input relation or this algebraic argument.

Solution: The truth table is XOR. Both (a XOR b) XOR c and a XOR (b XOR c) give parity of the three bits, and a XOR b=b XOR a. Thus the operation is associative and commutative, A.

Original paper, page 15 · Answer key