You are on page 1of 33

ADITYA ENGINEERING COLLEGE (A)

Digital Circuits and Logic Design


LOGIC GATES AND BOOLEAN
ALGEBRA
By

B.V.V.L.KALA BHARATHI
Dept of ELECTRICAL AND ELECTRONICS ENGINEERING
Aditya Engineering College(A)
Surampalem.
Aditya Engineering College (A)

Logic gates:
• Logic gates are building blocks of any digital system.
• It is an electronic circuit having one or more than one input and only
one one output.
• The relation between the input and output is based on a certain logic.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

Basic Logic Gates


• The following are the three basic Gates:
NOT
AND
OR
• Each logic gate performs a different logic function.
• can derive logical function or any Boolean or logic expression by
combining these three gates.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

NOT Gate:
• The simplest form of a digital logic circuit is the inverter or the NOT
gate
• It consists of one input and one output and the input can only be
binary numbers namely; 0 and 1
Truth table for NOT Gate:

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

AND Gate:
The AND gate is a logic circuit that has two or more inputs and a single
output
The operation of the gate is such that
• the output of the gate is a binary 1 if and only if all inputs are binary 1
• Similarly, if any one or more inputs are binary 0, the output will be
binary 0.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

OR Gate:
Like the AND gate, it can have two or more inputs and a single output.
The operation of OR gate is such that
• the output is a binary 1 if any one or all inputs are binary 1
• and the output is binary 0 only when all the inputs are binary 0.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

Universal Gates:
• A universal gate is a gate which can implement any boolean function
without need to use other gate type.
• All the other gates like And,Or,Not,can be derived from it.
• These are economical and easy to fabricate.
Two types:
NAND Gate
NOR Gate

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

NAND Gate
• The term NAND is a contraction of the expression NOT-AND gate.
• A NAND gate, is an AND gate followed by an inverter.
• The algebraic output expression of the NAND gate is Y = A.B.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

NOR Gate:
• The term NOR is a contradiction of the expression NOT-OR.
• A NOR gate, is an OR gate followed by an inverter.
• The algebraic output expression of the NOR gate is Y = A + B.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

EX-OR and EX-NOR Gates


• EX-OR and EX-NOR are digital logic circuits that may use two or more
inputs.

• EX-NOR gate returns the output opposite to EX-OR gate.

• EX-OR and EX-NOR gates are also denoted by XOR and XNOR
respectively.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

EX-OR Gate
• The Ex-OR (Exclusive- OR) gate returns high output with one of two high inputs
(but not with both high inputs or both low inputs)
• The algebraic output expression of the Ex-OR gate is Y = A ⊕ B =

A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

EX-NOR Gate
• The Ex-NOR (Exclusive- NOR) gate is a circuit that returns low output
with one of two high inputs (but not with both high inputs)
The output expression of the Ex-NOR gate is Y = AʘB = AB+AB=

A B AʘB
0 0 1
0 1 0
1 0 0
1 1 1

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

Applications of Logic Gates


• The following are some of the applications of Logic gates:
• Build complex systems that can be used to different fields such as
• Genetic engineering,
• Nanotechnology,
• Industrial Fermentation,
• Metabolic engineering and
• Medicine
• Construct multiplexers, adders and multipliers.
• Perform several parallel logical operations
• Used for a simple house alarm or fire alarm or in the circuit of automated
machine manufacturing industry

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)
Boolean Algebra
 Boolean Algebra is the mathematics we use to analyse digital gates and
circuits.
 named after George Boole who used it to study human logical reasoning –
calculus of proposition.
 Laws of Boolean Algebra :A set of rules to reduce number of gates required to
perform a logic operation.
The variables used in boolean algebra only have one of two possible values,a logic
0 and a logic 1.

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

Boolean Algebra Postulates


A Boolean algebra consists of a set of elements B, with two binary operations
{+} and {.} and a unary operation {'}, such that the following axioms hold:

 The set B contains at least two distinct elements x and y.


 Commutative laws: For every x, y in B,
x + y = y + x
x . y = y . x
 Associative laws: For every x, y, z in B,
(x + y) + z = x + (y + z) = x + y + z
(x . y) . z = x .( y . z) = x . y . z
Digital Circuits and logic design 8/24/20
Aditya Engineering College (A)

Precedence of Operators

 To lessen the brackets used in writing Boolean expressions, operator


precedence can be used.
 Precedence (highest to lowest): ' . +
 Examples:
a . b + c = (a . b) + c
b' + c = (b') + c
a + b' . c = a + ((b') . c)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Precedence of Operators

 Use brackets to overwrite precedence.


 Examples:
a . (b + c)
(a + b)' . c

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Duality
 Duality Principle – every valid Boolean expression (equality)
remains valid if the operators and identity elements are
interchanged, as follows:
+.
10
 Example: Given the expression
a + (b.c) = (a+b).(a+c)
then its dual expression is
a . (b+c) = (a.b) + (a.c)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Duality

 Duality gives free theorems – “two for the price of one”. You prove one
theorem and the other comes for free!
 If (x+y+z)' = x'.y.'z' is valid, then its dual is also valid:
(x.y.z)' = x'+y'+z’
 If x + 1 = 1 is valid, then its dual is also valid:
x.0=0

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Basic Theorems of Boolean Algebra


 Apart from the axioms/postulates, there are other useful theorems.
1. Idempotency:
(a) x + x = x (b) x . x = x
Proof of (a):
x + x = (x + x).1 (identity)
= (x + x).(x + x') (complementarity)
= x + x.x' (distributivity)
=x+0 (complementarity)
=x (identity)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Basic Theorems of Boolean Algebra


2. Null elements for + and . operators.
(a) x + 1 = 1 (b) x . 0 = 0
3. Involution. (x')' = x
4. Absorption.
(a) x + x.y = x (b) x.(x + y) = x
5. Absorption (variant).
(a) x + x'.y = x+y (b) x.(x' + y) = x.y

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Basic Theorems of Boolean Algebra


6. DeMorgan theorem:
(a) (x + y)' = x'.y'
(b) (x.y)' = x' + y'

7. Consensus theorem:
(a) x.y + x'.z + y.z = x.y + x'.z
(b) (x+y).(x'+z).(y+z) = (x+y).(x'+z)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Basic Theorems of Boolean Algebra

 Theorem 4a (absorption) can be proved by:


x + x.y = x.1 + x.y (identity)
= x.(1 + y) (distributivity)
= x.(y + 1) (commutativity)
= x.1 (Theorem 2a)
=x (identity)
 By duality, theorem 4b:
x.(x+y) = x
 Try prove this by algebraic manipulation.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

CANONICAL Form:
It is the way of representing Boolean outputs using boolean algebra.

 Two types:
 Sum-of-Products (SOP )form
 Product-of-Sums(POS) form
 Literals: a variable on its own or in its complemented form.
 Examples: x, x' , y, y'
 Product Term: a single literal or a logical product (AND) of several literals.
Examples: x , x.y.z‘ , A'.B , A.B
 Sum Term: a single literal or a logical sum (OR) of several literals.
Examples: x, x+y+z‘ , A'+B , A+B

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

 Sum-of-Products (SOP) Expression: A logical sum (OR) of several product terms.


Examples: 1. x.y'+x‘.y.z,
2. A.B+A'.B'

 Product-of-Sums (POS) Expression: A logical product (AND) of several sum


terms.
Examples: 1. x.(y+z'), (x+y').(x'+y+z),
2. (A+B).(A'+B')

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)
Minterm & Maxterm

 Consider two binary variables x, y.


 Each variable may appear as itself or in complemented form as literals (i.e. x, x'
& y, y' )
 MINTERM:
 For two variables, there are four possible combinations with the AND operator,
namely:
x'.y', x'.y, x.y', x.y
 These product terms are called the minterms.
 In general, n variables can give 2n minterms.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Maxterm

 In a similar fashion, a maxterm of n variables is the sum of n literals from the


different variables.
 For two variables, there are four possible combinations with the OR operator,
namely:
x'+y', x'+y, x+y', x+y
 In general, n variables can give 2n maxterms.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Minterm & Maxterm


 The minterms and maxterms of 2 variables are denoted by m0 to m3 and M0 to
M3 respectively:
Minterms Maxterms
x y term notation term notation
0 0 x'.y' m0 x+y M0
0 1 x'.y m1 x+y' M1
1 0 x.y' m2 x'+y M2
1 1 x.y m3 x'+y' M3

Each minterm is the complement of the corresponding maxterm:


Example: m2 = x.y'
m2' = (x.y')' = x' + (y')' = x'+y = M2

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

That means
minterms are product terms.
Maxterms are sum terms.
Therfore
Sum of minterms is SOP Canonical Form.
Example:A.B+A'.B' +A.B’
product of Maxterms is POS Canonical Form.
Example: A+B).(A'+B')+(A+B’)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Obtain the functions F1,F2 and F3 from the given table using minterms

x y z F1 = x.y.z' = m(6)
F2F1 F3
0 0 0 0 0 0
0 0 1 0 1 F2 1= x'.y'.z + x.y'.z‘ + x.y'.z + x.y.z‘ + x.y.z
0 1 0 0 0 0
0 1 1 0 0
= m(1,4,5,6,7)
1
1 0 0 0 1 1
1 0 1 0 1
F3 =
1
x'.y'.z + x'.y.z + x.y'.z' +x.y'.z
1 1 0 1 1 0
1 1 1 0 1
= m(1,3,4,5)
0

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Obtain the functions F1,F2 and F3 from the given table using
MAXterms

x y z F1 F2 F3
0 0 0 0 0 0 F1= M(0,1,2,3,4,5,7)
0 0 1 0 1 1
0 1 0 0 0 0
=(x+y+z).(x+y+z’)(x+y'+z).(x+y'+z') (x’+y+z)(x’+y’+z) (x'+y'+z')
0 1 1 0 0 1 F2 = M(0,2,3)
1 0 0 0 1 1 = (x+y+z).(x+y'+z).(x+y'+z')
1 0 1 0 1 1
1 1 0 1 1 0
F3 = M(0,2,6,7)
1 1 1 0 1 0 = (x+y+z).(x+y'+z).(x'+y'+z).(x'+y'+z')

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Conversion of Canonical Forms

 Sum-of-Minterms  Product-of-Maxterms
 Rewrite minterm shorthand using maxterm shorthand.
 Replace minterm indices with indices not already used.

Eg: F1(A,B,C) = m(3,4,5,6,7) = M(0,1,2)

 Product-of-Maxterms  Sum-of-Minterms
 Rewrite maxterm shorthand using minterm shorthand.
 Replace maxterm indices with indices not already used.

Eg: F2(A,B,C) = M(0,3,5,6) = m(1,2,4,7)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

THANK YOU

Digital circuits and logic


design Digital Circuits and logic design 8/24/20

You might also like