TITLE: Is XOR a combination of AND and NOT operators?
QUESTION [25 upvotes]: I'm not sure whether this is the best place to ask this, but is the XOR binary operator a combination of AND+NOT operators?

REPLY [4 votes]: $\{AND, NOT\}$ is a complete set of operators, i.e. you can express any boolean function $f:\{0,1\}^n \to \{0,1\}$ using them:
$$f(x_1,\cdots,x_n) = \lnot \bigwedge_{w\in f^{-1}(1)} \lnot \big(\bigwedge_{w_i=1}x_i \land \bigwedge_{w_i=0}\lnot x_i \big)$$