# Math Help - NAND gate

1. ## NAND gate

Consider the NAND gate: $(a,b) \to \neg(a \wedge b)$. This is irreversible at first glance. But why does using Toffoli gates allow one to convert this into a reversible process? For example if we use the following gate: $(a,b,c \oplus a \wedge b)$.

2. Originally Posted by Sampras
Consider the NAND gate: $(a,b) \to \neg(a \wedge b)$. This is irreversible at first glance. But why does using Toffoli gates allow one to convert this into a reversible process? For example if we use the following gate: $(a,b,c \oplus a \wedge b)$.
I have never heard of Toffoli gates. But from wiki, I think choosing c=1, will implement NAND in terms of Toffoli gates.