Implemented the last four gates: not, and, or, xor