A Logic Gate is a device that:
It has:
When both of the NAND gates inputs are on, the output is off. Otherwise, the output is on.
See NAND Gate
See Simple CPU