A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels.
There are seven logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
The three most used gates are AND ,OR ,NOT.
AND: The AND gate is so named because, if 0 is called «false» and 1 is called «true,» the gate acts in the same way as the logical «and» operator.
OR: The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive «or.» The output is «true» if either or both of the inputs are «true.» If both inputs are «false,» then the output is «false.»
NOT: A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.