Computers use logic gates to transform the 1s and 0s from input wires. A logic gate accepts inputs and then outputs a result based on their state.
And gate
The AND gate is named so because, if 0 is false and 1 is true, the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. The output is "true" when both inputs are "true." Otherwise, the output is "false." In other words, the output is 1 only when both inputs are 1.
Or gate
The OR gate behave like the logical inclusive "or." The output is true if one or both of the inputs are true. If both inputs are false, then the output is false. In other words, for the output to be 1, at least one input must be 1.
XOR gate
The XOR (exclusive-OR) gate acts in the same way as the logical "either/or." The output is 1 if the inputs are different but 0 if the inputs are the same.
NOT gate
A NOT gate reverses the logic state. If the input is 1, then the output is 0. If the input is 0, then the output is 1.
NAND gate
The NAND (Negated AND) gate operates as an AND gate followed by a NOT gate. The output is false if both inputs are true. Otherwise, the output is true.
NOR gate
The NOR (NOT OR) gate is a combination OR gate followed by a NOT. Its output is true if both inputs are false. Otherwise, the output is false.
XNOR gate
The XNOR (exclusive-NOR) gate is a combination of an XOR gate followed by a NOT. Its output is true if the inputs are the same and false if the inputs are different.
Top comments (0)