why does xnor work as an and gate code example Example: xnor gate XNOR gate: A B Output 0 0 = 1 1 0 = 0 0 1 = 0 1 1 = 1