An AND gate computes for bits . It is irreversible when only its one-bit output is retained. The Toffoli gate embeds the operation reversibly as ; setting preserves the inputs while recording their logical conjunction.
New to topics? Read the docs here!