GATE / CS ARCHIVE

GATE CSE 1992 / QUESTION 2(i)

Commutative but nonassociative gate

Digital Logic · Boolean Algebra & Logic Gates · Full GATE CSE 1992 paper

GATE 1992, Q2(i) MSQ
Report issue

Boolean Algebra & Logic Gates

Question 2(i), GATE 1992: Which operation is commutative but not associative: AND, OR, XOR, NAND?
Question 2(i), GATE 1992: Which operation is commutative but not associative: AND, OR, XOR, NAND?
Tap to enlarge
Select all that apply
Answer & solution

Answer: D: NAND (no official key was published)

NAND(a, b)=¬(ab), unchanged when a and b are exchanged, so it is commutative. To refute associativity choose a=0, b=1, c=1. Then NAND(NAND(0, 1), 1)=NAND(1, 1)=0, whereas NAND(0, NAND(1, 1))=NAND(0, 0)=1. AND, OR and XOR are associative as well as commutative. A single counterexample suffices to disprove the NAND associativity identity for all triples.

Original paper, page 1