Logic Gates

or in Dirac Notation

We can check: