A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. The logic normally performed is Boolean logic and is most commonly found in digital circuits. Logic gates are primarily implemented electronically using diodes or transistors, but can also be constructed using electromagnetic relays, fluidics, optics, molecules, or even mechanical elements.
In electronic logic, a logic level is represented by a voltage or current, (which depends on the type of electronic logic in use). Each logic gate requires power so that it can source and sink currents to achieve the correct output voltage. In logic circuit diagrams the power is not shown, but in a full electronic schematic, power connections are required.
SYMBOLS AND TRUTH TABLE
Type | Distinctive shape | Rectangular shape | Boolean algebra between A & B | Truth table |
AND | | | | INPUT | OUTPUT | A | B | A AND B | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | |
OR | | | A + B | INPUT | OUTPUT | A | B | A OR B | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | |
NOT | | | | INPUT | OUTPUT | A | NOT A | 0 | 1 | 1 | 0 | |
In electronics a NOT gate is more commonly called an inverter. The circle on the symbol is called a bubble, and is generally used in circuit diagrams to indicate an inverted (active-low) input or output.[1] |
NAND | | | | INPUT | OUTPUT | A | B | A NAND B | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | |
NOR | | | | INPUT | OUTPUT | A | B | A NOR B | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | |
|
XOR | | | | INPUT | OUTPUT | A | B | A XOR B | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | |
XNOR | | | | INPUT | OUTPUT | A | B | A XNOR B | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | |