Basic Logic Gates and Truth-tables
➢ What is a logic gate ?
Actually, the term logic is applied to digital circuits used to implement logic
functions. Several kinds of digital logic circuits are the basic elements that
form the building blocks for such complex digital system as the computer.
A circuit that performs a specific logic operation is called a logic gate .
➢ The Invertor (NOT Gate)
The NOT operation changes one logic level to the opposite logical level. When
the input is low, the output is high and vice versa. In terms of bits, it
changes a 1 to a 0 and 0 to 1.
Logical expression for output X, given that the input is A, is X= A’.
A X
➢ The AND Gate
It can have two or more inputs and performs what is known as
multiplication. Therefore, output is high when all inputs are high otherwise
all outputs are low.
Logical expression for output X, given that the inputs are A & B, is X=AB .
➢ Determining the total number of possible combinations
N = 2n
Where N is the number of possible input combinations and n is the number
of input variables.
➢ The or Gate
It can have 2 or more inputs and performs what is known as logical addition.
Therefore, the output is low when all inputs are low, otherwise all outputs
are high.
Logical expression for output X, given that the inputs are A & B, is X= A+ B.
X
➢ The NAND gate
It can be used as a universal gate, i.e. it can be used in combination to
perform the AND, OR and NOT operations. (combination of NOT & AND gate)
The output is low when all inputs are high, otherwise all outputs are high.
Logical expression for output X, given that the inputs are A & B, is X=(AB)’.
➢ The NOR Gate
It can also be used as a universal gate. (combination of NOT & OR gate)
The output is high when all inputs are low, otherwise the output is low.
Logical expression for output X, given that the inputs are A & B, is X= (A+B)’.
➢ The Exclusive OR Gate
It takes only 2 inputs. If both inputs are low or both are high, then the
output is low, otherwise the output is high.
Logical expression for output X, given that the inputs are A & B, is X=AB’+A’B
➢ Exclusive NOR Gate
It takes only 2 inputs. If both inputs are low or both are high, then the
output is high, otherwise the output is low.
Logical expression for output X, given that the inputs are A & B, is X=AB+ A’B’