xnor gate logic expression code example Example: xnor gate XNOR gate: A B Output 0 0 = 1 1 0 = 0 0 1 = 0 1 1 = 1