Logic Gates
Logic Gates
Logic Gates
Introduction
• The logic gates are the main structural part of a digital
system.
• Logic Gates are a block of hardware that produces signals
of binary 1 or 0 when input logic requirements are satisfied.
• Each gate has a distinct graphic symbol, and its operation
can be described by means of algebraic expressions.
• The seven basic logic gates includes: AND, OR, XOR, NOT,
NAND, NOR, and XNOR.
• The relationship between the input-output binary variables
for each gate can be represented in tabular form by a truth
table.
• Each gate has one or two binary input variables designated
by A and B and one binary output variable designated by
x.
AND GATE
• The AND gate is an electronic circuit which gives a high
output only if all its inputs are high.
• The AND operation is represented by a dot (.) sign.
OR GATE
• The OR gate is an electronic circuit which gives a high output
if one or more of its inputs are high.
• The operation performed by an OR gate is represented by a
plus (+) sign.
NOT GATE
• The NOT gate is an electronic circuit which produces an
inverted version of the input at its output.
• It is also known as an Inverter.
NAND GATE
• The NOT-AND (NAND) gate which is equal to an AND gate
followed by a NOT gate.
• The NAND gate gives a high output if any of the inputs are
low.
• The NAND gate is represented by a AND gate with a small
circle on the output.
• The small circle represents inversion
NOR GATE
• The NOT-OR (NOR) gate which is equal to an OR gate
followed by a NOT gate.
• The NOR gate gives a low output if any of the inputs are
high.
• The NOR gate is represented by an OR gate with a small
circle on the output. The small circle represents inversion.
NOR GATE
Exclusive-OR/ XOR GATE
• The 'Exclusive-OR' gate is a circuit which will give a high
output if one of its inputs is high but not both of them.
• The XOR operation is represented by an encircled plus sign.
EXCLUSIVE-NOR/Equivalence GATE
• The 'Exclusive-NOR' gate is a circuit that does the inverse
operation to the XOR gate.
• It will give a low output if one of its inputs is high but not
both of them. The small circle represents inversion.
Boolean Algebra
• Boolean algebra can be considered as an algebra that
deals with binary variables and logic operations.
• Boolean algebraic variables are designated by letters such
as A, B, x, and y.
• The basic operations performed are AND, OR, and
complement.
• The Boolean algebraic functions are mostly expressed with
binary variables, logic operation symbols, parentheses, and
equal sign.
• For a given value of variables, the Boolean function can be
either 1 or 0.
• For instance, consider the Boolean function
• F = x + y'z
• The logic diagram for the Boolean function F = x + y'z can
be represented as
• The Boolean function F = x + y'z is transformed from an
algebraic expression into a logic diagram composed of
AND, OR, and inverter gates.
• Inverter at input 'y' generates its complement y'.
• There is an AND gate for the term y'z, and an OR gate is
used to combine the two terms (x and y'z).
• The variables of the function are taken to be the inputs of
the circuit, and the variable symbol of the function is taken
as the output of the circuit.
• A truth table can represent the relationship between a
function and its binary variables.
• To represent a function in a truth table, we need a list of the
2^n combinations of n binary variables.
• The truth table for the Boolean function F = x + y'z can be
represented as
Simplifications of Boolean algebra
using logic gates
F1 = xyz'
F2 = x + y'z
F3 = xy' + x'z
Laws of Boolean Algebra
Commutative Law
• Commutative Law states that the interchanging of the
order of operands in a Boolean equation does not change
its result.
For example,
i. OR operator → A + B = B + A
ii. AND operator → A * B = B * A
Associative Law
• Associative Law of multiplication states that the AND
operation are done on two or more than two variables.
For example:
A * (B * C) = (A * B) * C
Distributive Law
• Distributive Law states that the multiplication of two
variables and adding the result with a variable will result in
the same value as multiplication of addition of the variable
with individual variables.
For example:
A + BC = (A + B) (A + C).
Other Laws
i. Annulment law
A.0 = 0
A+1=1
ii. Identity law
A.1 = A
A+0=A
iii. Idempotent law
A+A=A
A.A = A
Other Laws
iv. Complement law:
A + A' = 1
A.A'= 0
v. Double negation law:
((A)')' = A
vi. Absorption law:
A.(A+B) = A
A + AB = A
De Morgan's Law
• De Morgan's Law is also known as De Morgan's theorem,
works depending on the concept of Duality.
• Duality states that interchanging the operators and
variables in a function, such as replacing 0 with 1 and 1
with 0, AND operator with OR operator and OR operator
with AND operator.
De Morgan's Law ..