Multiple choice general knowledge science & technology

which of the operation is commutative but not associative?

  1. AND

  2. OR

  3. NOR

  4. NAND

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

NAND is commutative because A NAND B = B NAND B (inputs can be swapped without changing the output). However, it is not associative because (A NAND B) NAND C does not always equal A NAND (B NAND C). For example, with A=B=C=0: (0 NAND 0) NAND 0 = 1 NAND 0 = 0, but 0 NAND (0 NAND 0) = 0 NAND 1 = 1.