Logic Gates
Binary logic gates are simple circuits that take one or more input signals and out send one output signal. Several of these gates are defined below.
AND gate:
The AND gate takes two or more inputs and performs a logic AND on them. See the truth table and diagram of the AND gate. Notice that if both inputs to the AND gate are 1, the output will be 1. Any other combination of inputs will give a 0 output. The example shows two inputs, x and y. Multiple outputs are also possible for logic gates. In the case of AND, if all inputs are 1, the output is 1. If any input is 0, the output is 0.
OR gate:
The OR logic function will output a 1 if one or more inputs is 1. If all inputs are 0, then and only then will the output be 0.
Tri-state Buffer:
A buffer gate does not change the logic level of the input. It is used to isolate or amplify the signal.
Inverter:
The inverter, also called NOT, output the value opposite to the gate. That is, a 1 input will give a 0 output, while a 0 input will give a 1 output.
XOR gate:
The XOR gate performs an exclusive-OR operation on the inputs. Exclusive-OR produces a 1 output if one (but only one) input is 1. If both operands are 0, the output is zero. Likewise, if both operands are 1, the output is also 0. Notice from the XOR truth table, that whenever the two inputs are the same, the output is 0. This function can be used to compare two bits to see if they are the same.
NAND and NOR gates:
The NAND gate functions like an AND gate with an inverter on the output. It produces a 0 output when all inputs are 1; otherwise, it produces a 1 output. The NOR gate functions like an OR gate with an inverter on the output . It produces a 1 if all inputs are 0; otherwisw, it produces a 0. NAND and NOR gates are used extensively in digital design because they are easy and inexpensive to fabricate. Any circuit that can be designed with AND,OR,XOR, and Inverter gates can be implemented using only NAND and NOR gates.. A simple example of this is given below. Notice in NAND, that if any input is zero, the output is 1. Notice in NOR, that if any input is one, the output is zero.
No comments: