SlideShare a Scribd company logo
Boolean Algebra
and
Logic Gate
Prof. K ADISESHA (Ph. D)
Introduction
to
Boolean Algebra
Introduction
Logical Operators
Logic Gates
Basic Theorems
Boolean Expression
2
Boolean Algebra
Prof. K. Adisesha (Ph. D)
K-Maps
Introduction
Prof. K. Adisesha (Ph. D)
3
Introduction to Boolean Algebra:
An algebra that deals with binary number system is called “Boolean Algebra”.
➢ It is very power in designing logic circuits used by the processor of computer system.
➢ The logic gates are the building blocks of all the circuit in a computer.
➢ Boolean algebra deals with truth table TRUE and FALSE.
➢ If result of any logical statement or expression is always TRUE or 1, it is called
Tautology and if the result is always FALSE or 0, it is called Fallacy
➢ It is also called as “Switching Algebra”.
Introduction
Prof. K. Adisesha (Ph. D)
4
History of Boolean Algebra:
Father of “Boolean Algebra”.
➢ Boolean algebra derives its name from the mathematician
George Boole (1815-1864) who is considered the
“Father of symbolic logic”.
➢ He came up with a type of Boolean algebra, the three most
basic operations of which were (and still are) AND, OR and NOT.
➢ It was these three functions that formed the basis of his premise, and were the only
operations necessary to perform comparisons or basic mathematical functions.
George Boole (1815 - 1864)
Introduction
Prof. K. Adisesha (Ph. D)
5
Introduction to Boolean Algebra
A variable used in Boolean algebra or Boolean equation can have only one of two variables.
The two values are FALSE (0) and TRUE (1)
➢ A Sentence which can be determined to be TRUE or FALSE are called logical statements or
truth functions and the results TRUE or FALSE is called Truth values.
➢ Boolean Expression consists of
❖ Literal: A variable or its complement
❖ Product term: literals connected by •
❖ Sum term: literals connected by +
➢ A truth table is a mathematical table used in logic to computer functional values of logical
expressions.
Boolean Algebra
Prof. K. Adisesha (Ph. D)
6
Truth Table
A variable used in Boolean algebra or Boolean equation can have only one of two variables.
The two values are FALSE (0) and TRUE (1)
➢ A truth table is a mathematical table used in logic to computer functional values of logical
expressions.
➢ A truth table is a table whose columns are statements and whose rows are possible scenarios.
➢ Example: Consider the logical expression
❖ Logical Statement: Sports = “Sunny can Play Cricket OR Football”
❖ Y = A OR B (Logical Variables: Y, A, B, Logical Operator OR)
A=Cricket B=Football Y=A OR B
0 0 0
0 1 1
1 0 1
1 1 1
Boolean Algebra
Prof. K. Adisesha (Ph. D)
7
Logical Operators
There are three logical operator, AND, OR and NOT.
➢ These operators are now used in computer construction known as switching circuits.
➢ B = {0, 1} and two binary operators, ‘+’ and ‘.’
➢ The rules of operations: AND, OR and NOT.
❖ Complement: ~X (opposite of X)
❖ AND : X × Y
❖ OR : X + Y
Logical Operators
Prof. K. Adisesha (Ph. D)
8
AND Operator
The operation performed by AND operator is called logical multiplication.
➢ The AND operator is read as “If and Only If”. This operator operates on two or more variables.
➢ The symbol we use for it is ‘.’
➢ Example: X . Y can be read as X AND Y
➢ The Truth table, Venn diagram and the Circuit diagram for the AND operator is.
Logical Operators
Prof. K. Adisesha (Ph. D)
9
OR Operator
The operation performed by OR operator is called logical addition.
➢ The OR operator is read as “If at-least One”. This operator operates on two or more variables.
➢ The symbol we use for it is ‘+’.
➢ Example: X + Y can be read as X OR Y
➢ The Truth table, Venn diagram and the Circuit diagram for the OR operator is.
Logical Operators
Prof. K. Adisesha (Ph. D)
NOT Operator
The operation performed by Not operator is called complementation.
➢ The Not operator is a unary operator. This operator operates on single variable.
➢ The symbol we use for it is bar.
❖ ~𝐗 means complementation of X
❖ If X=1 then ~X =0 If X=0 then, ~X =1
➢ The Truth table, Venn diagram and the Circuit diagram for the NOT operator is.
10
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Basic Boolean Theorems :
11
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Basic Postulates and Theorems :
12
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Principle of duality
The principle of duality states that every algebraic expression deducible from the postulates of
Boolean algebra, remains valid if the operators identity elements are interchanged:
➢ To form the dual of an expression, replace all + operators with . operators, all . operators with
+ operators, all ones with zeros, and all zeros with ones.
➢ Form the dual of the expression
❖ (A+1)=(A.0)
❖ a + (b.c) = (a + b).(a + c)
➢ Following the replacement rules:
❖ a(b + c) = a.b + a.c
➢ Take care not to alter the location of the parentheses if they are present.
13
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Idempotences Law:
Idempotences Law states that when a variable is combines with itself using OR or AND
operator, the output is the same variable”.
14
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Identity Law:
Identity Law states that when a variable is combines with 0 or 1 itself using OR or AND
operator, the output is the 0 or 1”.
15
Boolean Theorems
Prof. K. Adisesha (Ph. D)
Absorption Law:
“This law enables a reduction of complicated expression to a simpler one by absorbing
common terms”.
16
Boolean Theorems
Prof. K. Adisesha (Ph. D)
De-Morgan’s Theorem:
Stated by De-Morgan has two theorems:
➢ Theorem 5(a): “When the OR sum of two variables is inverted, this is same as inverting each
variable individually and then AND ing these inverted variables”
❖ (x + y)’ = x’y’
➢ Theorem 5(b): “When the AND product of two variables is inverted, this is same as
inverting each variable individually and then OR ing these inverted variables”
❖ (xy)’ = x’ + y’
➢ Can be proved by means of:
❖ Truth table or Algebraically
17
Boolean Theorems
Prof. K. Adisesha (Ph. D)
De-Morgan’s Theorem:
Stated by De-Morgan has two theorems:
➢ Proof by means of truth table:
❖ (x + y)’ = x’y’ (xy)’ = x’ + y’
18
x y x’ y’ x+y (x+y)’ x’y’ xy x’+y' (xy)’
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
Boolean Theorems
Prof. K. Adisesha (Ph. D)
De-Morgan’s Theorem:
➢ Proof by means of Algebraically:
❖ (x + y)’ = x’y’
19
Boolean Theorems
Prof. K. Adisesha (Ph. D)
De-Morgan’s Theorem:
➢ Proof by means of Algebraically:
❖ (xy)’ = x’ + y’
20
Boolean Expression
Prof. K. Adisesha (Ph. D)
Boolean Functions:
➢ A Boolean function consists of various constraints:
❖ Binary variables
❖ Binary operators OR and AND
❖ Unary operator NOT
❖ Parentheses
➢ Examples
❖ F1= x y z'
❖ F2 = x + y'z
❖ F3 = x' y' z + x' y z + x y'
❖ F4 = x y' + x' z
21
Boolean Expression
Prof. K. Adisesha (Ph. D)
Simplification of Boolean Expression:
Simplification of Boolean expression can be achieved by two popular methods:
➢ Algebraic Manipulation
➢ Karnaugh Maps (K Map)
22
Boolean Expression
Prof. K. Adisesha (Ph. D)
Operator Precedence
The operator precedence for evaluating Boolean Expression is:
➢ Parentheses
➢ NOT
➢ AND
➢ OR
➢ Examples
❖ x z’ + y
❖ (x y + z)'
23
Boolean Expression
Prof. K. Adisesha (Ph. D)
Evaluation of Boolean Expression using Truth Table
To create a truth table, follow the steps given below.
➢ Step 1: Determine the number of variables, for n variables create a table with 2n rows.
❖ For two variables i.e. X, Y then truth table will need 2^2 or 4 rows.
❖ For three variables i.e. X, Y, Z, then truth table will need 2^3 or 8 rows.
➢ Step 2: List the variables and every combination of 1 (TRUE) and 0 (FALSE) for the given
variables
➢ Step 3: Create a new column for each term of the statement or argument.
➢ Step 4: If two statements have the same truth values, then they are equivalent.
24
Boolean Expression
Prof. K. Adisesha (Ph. D)
Evaluation of Boolean Expression
Consider the following Boolean Expression F=X+Y.
➢ Step 1: This expression as two variables X and Y, then 2^2 or 4 rows.
➢ Step 2: List the variables and every combination of X and Y.
➢ Step 3: The final column contain the values of F=X+ Y.
25
Boolean Expression
Prof. K. Adisesha (Ph. D)
Evaluation of Boolean Expression
Consider the following Boolean Expression:
➢ The truth table for the Boolean function:
is shown at the right.
➢ To make evaluation of the Boolean function easier,
the truth table contains extra (shaded) columns to hold
evaluations of subparts of the function.
26
Boolean Expression
Prof. K. Adisesha (Ph. D)
Simplification of Boolean Expression:
Algebraic Manipulation:
➢ To minimize Boolean expressions
❖ Literal: single variable in a term (complemented or uncomplemented ) (an input to a gate)
❖ Term: an implementation with a gate
❖ The minimization of the number of literals and the number of terms → a circuit with less
equipment
❖ It is a hard problem (no specific rules to follow)
➢ Example 2.1
❖ x(x'+y) = xx' + xy = 0+xy = xy
❖ x+x'y = (x+x')(x+y) = 1 (x+y) = x+y
27
Boolean Expression
Prof. K. Adisesha (Ph. D)
Simplification of Boolean Expression by Algebraic Manipulation:
➢ Example:
28
Boolean Expression
Prof. K. Adisesha (Ph. D)
Simplification of Boolean Expression by Algebraic Manipulation:
➢ Example:
29
Boolean Expression
Prof. K. Adisesha (Ph. D)
Simplification of Boolean Expression by Algebraic Manipulation:
➢ Example:
30
Boolean Expression
Prof. K. Adisesha (Ph. D)
Canonical and Standard Forms :
The two canonical forms of Boolean algebra are basic forms that one obtains from
reading a given function from the truth table.
➢ We do not use it, because each minterm or maxterm must contain, by definition, all
the variables, either complemented or uncomplemented.
➢ Standard forms: the terms that form the function may obtain one, two, or any number
of literals.
❖ Sum of products: F1 = y' + xy+ x'yz'
❖ Product of sums: F2 = x(y'+z)(x'+y+z')
31
Boolean Expression
Prof. K. Adisesha (Ph. D)
Canonical and Standard Forms :
Minterms and Maxterms
➢ Boolean expression expressed as sum of Minterms or product of Maxterms are called
canonical forms.
❖ The Minterm canonical expression is the Sum of all products (SOP)
❖ The maxterm canonical expression is the product of all Sum terms (POS).
➢ For example, the following expressions are the Minterm canonical form and Maxterm
canonical form of two variables X and Y.
❖ Minterm Canonical = f(X, Y) = X’Y’ + X’ Y +X Y’+ X Y
❖ Maxterm Canonical = f(X, Y) = (X+Y).(X +Y’).(X’+Y’)
32
Boolean Expression
Prof. K. Adisesha (Ph. D)
Canonical and Standard Forms :
Minterms and Maxterms
➢ The minterms that produce a (0)
❖ f1' = m0 + m2 +m3 + m5 + m6 = x'y'z'+x'yz'+x'yz+xy'z+xyz'
❖ f1 = (f1')' = m’0 . m’2 . m’3 . m’5 . m’6 (Complement of minterms)
➢ The maxterms that produce a (1)
❖ = (x+y+z)(x+y'+z) (x+y'+z') (x'+y+z')(x'+y'+z) = M0, M2, M3, M5, M6
❖ f2 = (x+y+z)(x+y+z')(x+y'+z)(x'+y+z)=M0, M1, M2, M4
➢ Any Boolean function can be expressed as
❖ A sum of minterms (“sum” meaning the ORing of terms).
❖ A product of maxterms (“product” meaning the ANDing of terms).
❖ Both Boolean functions are said to be in Canonical form.
33
Boolean Expression
Prof. K. Adisesha (Ph. D)
Minterms and Maxterms:
Each maxterm is the complement of its corresponding minterm, and vice versa
34
Boolean Expression
Prof. K. Adisesha (Ph. D)
Minterms and Maxterms for three variables:
35
Boolean Expression
Prof. K. Adisesha (Ph. D)
Minterms and Maxterms:
Any Boolean function can be expressed by:
➢ A truth table
➢ Sum of minterms
➢ f1 = x'y'z + xy'z' + xyz = m1 + m4 +m7
= S(1, 4, 7) (Minterms)
➢ f2 = x'yz+ xy'z + xyz'+xyz = m3 + m5 +m6 + m7
=P(3,5,6,7) (Minterms)
36
Boolean Expression
Prof. K. Adisesha (Ph. D)
Minterms or Sum of Products (SOP):
The Minterm canonical expression is the Sum of all products (SOP)
➢ Sum of minterms: there are 2n minterms
➢ Example 4: Express F = A+BC’
as a sum of minterms.
➢ F(A, B, C) = Σ(1, 4, 5, 6, 7)
37
Boolean Expression
Prof. K. Adisesha (Ph. D)
Maxterms or Product of Sum (POS):
The maxterm canonical expression is the product of all Sum terms (POS)
➢ Product of Sum terms : there are 2n minterms
➢ Example : F = xy + x'z as a product of maxterms.
➢ F(x, y, z) = Π(0, 2, 4, 5)
38
Boolean Expression
Prof. K. Adisesha (Ph. D)
Conversion between Canonical Forms:
The complement of a function expressed as the sum of minterms equals the sum of minterms
missing from the original function.
➢ Minterm Canonical
❖ F(A, B, C) = Σ(1, 4, 5, 6, 7)
❖ Thus, F'(A, B, C) = Σ(0, 2, 3) = m0 + m2 +m3
➢ By De-Morgan's theorem
➢ Maxterm Canonical
❖ F(A, B, C) = (m0 + m2 +m3)' = M0 M2 M3 = Π(0, 2, 3)
❖ F'(A, B, C) =Π (1, 4, 5, 6, 7)
➢ Interchange the symbols Σ of 1’s and Π of 0’s and list those numbers missing from the original form.
39
Boolean Expression
Prof. K. Adisesha (Ph. D)
Conversion between Canonical Forms:
Two different ways to specify the same function f of three variables.
➢ Minterm Canonical
❖ SOP Form
❖ f(x,y,z) = Σ m(1, 3, 6, 7)
➢ Maxterm Canonical
❖ POS Form
❖ f(x,y,z) = Π M(0, 2, 4, 5)
40
Boolean Expression
Prof. K. Adisesha (Ph. D)
Conversion of SOP into Canonical form:
Convert the Boolean function f(X, Y) = X + X Y into canonical form.
➢ Solution:
❖ The given Boolean function f(X, Y) = X + X Y ------ (i)
❖ It has two variables and sum of two Minterms. The first term X is missing one variable.
❖ So to make it of two variables it can be multiplied by (Y+Y’)=1.
❖ Therefore, X = X (Y+Y’) =XY+XY’
❖ Substitute the value of X in (i) we get f(X, Y) = X Y+X Y’ + X Y
❖ Here, the term X Y appear twice, it is possible to remove one of them. f(X, Y) = X Y+X Y’
❖ Therefore: SOP Expression is f(X, Y) = Σ (2, 3)
41
Boolean Expression
Prof. K. Adisesha (Ph. D)
Conversion of POS into Canonical form:
Convert the Boolean function F(X, Y, Z) = X+Y (Y+Z) into canonical form.
➢ Solution:
❖ The given Boolean function F(X,Y,Z) = (X+Y).(Y+Z) ------(i)
❖ It has three variables and product of two Maxterms. Each Maxterm is missing one variable.
❖ The first term can be written as X+Y = (X+Y+Z. Z ) Since Z. Z =0
❖ Using distributive law (X + YZ) = (X + Y) (X + Z), we can write X+Y = (X+Y+Z) (X+Y+ Z ) ---(ii)
❖ The Second term can be written as Y + Z = (Y+Z+X. X ) Y+Z = (Y+Z+X) (Y+Z+X ) ----(iii)
❖ Substitute (ii) and (iii) in (i) we get
F(X, Y, Z) = (X+Y+Z) (X+Y+ Z ) (Y+Z+X) (Y+Z+X )
❖ Therefore: POS Expression is F(X, Y, Z) = π (0, 1, 4)
42
Karnaugh Map
Prof. K. Adisesha (Ph. D)
Karnaugh Map:
A graphical display of the fundamental products in a truth table.
➢ Fundamental Product: The logical product of variables and complements that produces a high
output for a given input condition.
➢ The map method provides simple procedure for minimizing the Boolean function.
➢ The map method was first proposed by E.W. Veitch in 1952 known as “Veitch Diagram”.
➢ In 1953, Maurice Karnaugh proposed “Karnaugh Map” also known as “K-Map”.
43
Karnaugh Map
Prof. K. Adisesha (Ph. D)
Construction of K-Map :
The K-Map is a pictorial representation of a truth table made up of squares.
➢ Each square represents a Minterm or Maxterm.
➢ The Karnaugh map is completed by entering a '1‘(or ‘0’) in each of the appropriate cells.
➢ A K-Map for n variables is made up of 2n squares.
❖ Single Variable K-Map: The map consists of 2 squares (i.e. 2n square, 21
= 2 square)
❖ Two Variable K-Map : The map consists of 4 squares (i.e. 2n
square, 22
= 4 square)
❖ Three Variable K-Map: The map consists of 8 squares (i.e. 2n square, 23
= 8 square)
❖ Four Variable K-Map : The map consists of 16 squares (i.e. 2n
square, 24
= 16 square)
44
Karnaugh Map
Prof. K. Adisesha (Ph. D)
Construction of K-Map :
Karnaugh maps, or K-maps, are often used to simplify logic problems with 2, 3 or 4
variables.
➢ Within the map, adjacent cells containing 1's (or 0’s) are grouped together in twos, fours, or
eights.
➢ For the case of 2 variables, we form a map consisting of 22
=4 cells
➢ as shown in Figure .
45
Karnaugh Map
Prof. K. Adisesha (Ph. D)
Construction of K-Map :
Karnaugh maps, or K-maps, are often used to simplify logic problems with 3 or 4
variables.
46
AB
C 00 01 11 10
0
1
CBA CBA CAB CBA
CBA BCA ABC CBA
0 2 6 4
531 7
3 Variables Cell = 23=8
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
47
Logic Gates:
A logic gate is an idealized model of computation or physical electronic device
implementing a Boolean function.
➢ A logical operation performed on one or more
binary inputs that produces a single binary output.
➢ Types of Logic Gates:
➢ Basic Gates
➢ Universal Gates
➢ Exclusive Gates
Types of Logic Gates:
Basic Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
48
Types of Logic Gates:
Universal Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
49
Types of Logic Gates:
Exclusive Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
50
NAND Gate is a Universal Gate
Prof. K. Adisesha (Ph. D)
51
To prove that any Boolean function can be implemented using only NAND gates, we will show that the
AND, OR, and NOT operations can be performed using only these gates
NOR Gate is a Universal Gate
Prof. K. Adisesha (Ph. D)
52
To prove that any Boolean function can be implemented using only NOR gates, we will show that the
AND, OR, and NOT operations can be performed using only these gates
Realization of Basic Gates using Universal Gates:
NAND Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
53
Realization of Basic Gates using Universal Gates:
NOR Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
54
Realization of Exclusive Gates using Universal Gates:
Using NAND Gates: Using NOR Gates:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
55
Binary Adder:
In many computers and other kinds of processors adders are used in the
arithmetic logic units or ALU.
➢ An adder is a device that will add together two bits and give the result as the
output.
➢ There are two kinds of adders –
❖ Half adders: A half adder just adds two bits together and gives a two-bit
output
❖ Full adders: A full adder adds two inputs and a carried input from another
adder, and also gives a two-bit output.
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
56
Realization of Half Adder Circuits using Logic Gates:
Half adders: A half adder just adds two bits together and gives a two-bit output
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
57
Realization of Full Adder Circuits using Logic Gates:
Full adders: A full adder adds two inputs and a carried input from another adder,
and also gives a two-bit output.
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
58
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
59
Integrated Circuits:
A collection of one or more gates fabricated on a single silicon chip is called an
integrated circuit (IC).
➢ ICs were classified by size:
❖ SSI - small scale integration - 1~20 gates
❖ MSI - medium scale integration - 20~200 gates
❖ LSI - large scale integration - 200~200,000 gates
❖ VLSI - very large scale integration - over 1M transistors
➢ Pentium-III - 40 million transistors
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
60
Integrated Circuits:
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
61
DIP Packages
Digital Logic Gates
Prof. K. Adisesha (Ph. D)
62
Gates in ICs
NOR Gate is a Universal Gate
Prof. K. Adisesha (Ph. D)
63
Implementation with logic gates
Boolean Functions
Prof. K. Adisesha (Ph. D)
64
Implementation with logic gates
Boolean Functions
Prof. K. Adisesha (Ph. D)
65
Multiple Inputs Gates
Multiple input NOR = a complement of OR gate, Multiple input NAND = a complement of AND.
➢ The cascaded NAND operations = sum of products.
➢ The cascaded NOR operations = product of sums.
Boolean Functions
Prof. K. Adisesha (Ph. D)
66
Multiple Inputs Gates
The XOR and XNOR gates are commutative and associative.
➢ XOR is an odd function: it is equal to 1 if the inputs variables have an odd number of 1's.
Boolean Functions
67
Positive and Negative Logic
The XOR and XNOR gates are commutative and associative.
➢ Positive and Negative Logic
❖ Two signal values <=> two logic values
❖ Positive logic: H=1; L=0
❖ Negative logic: H=0; L=1
Prof. K. Adisesha (Ph. D)
Discussion
Prof. K. Adisesha (Ph. D)
68
Queries ?
Prof. K. Adisesha
9449081542

More Related Content

Boolean algebra & logic gates

  • 2. Introduction to Boolean Algebra Introduction Logical Operators Logic Gates Basic Theorems Boolean Expression 2 Boolean Algebra Prof. K. Adisesha (Ph. D) K-Maps
  • 3. Introduction Prof. K. Adisesha (Ph. D) 3 Introduction to Boolean Algebra: An algebra that deals with binary number system is called “Boolean Algebra”. ➢ It is very power in designing logic circuits used by the processor of computer system. ➢ The logic gates are the building blocks of all the circuit in a computer. ➢ Boolean algebra deals with truth table TRUE and FALSE. ➢ If result of any logical statement or expression is always TRUE or 1, it is called Tautology and if the result is always FALSE or 0, it is called Fallacy ➢ It is also called as “Switching Algebra”.
  • 4. Introduction Prof. K. Adisesha (Ph. D) 4 History of Boolean Algebra: Father of “Boolean Algebra”. ➢ Boolean algebra derives its name from the mathematician George Boole (1815-1864) who is considered the “Father of symbolic logic”. ➢ He came up with a type of Boolean algebra, the three most basic operations of which were (and still are) AND, OR and NOT. ➢ It was these three functions that formed the basis of his premise, and were the only operations necessary to perform comparisons or basic mathematical functions. George Boole (1815 - 1864)
  • 5. Introduction Prof. K. Adisesha (Ph. D) 5 Introduction to Boolean Algebra A variable used in Boolean algebra or Boolean equation can have only one of two variables. The two values are FALSE (0) and TRUE (1) ➢ A Sentence which can be determined to be TRUE or FALSE are called logical statements or truth functions and the results TRUE or FALSE is called Truth values. ➢ Boolean Expression consists of ❖ Literal: A variable or its complement ❖ Product term: literals connected by • ❖ Sum term: literals connected by + ➢ A truth table is a mathematical table used in logic to computer functional values of logical expressions.
  • 6. Boolean Algebra Prof. K. Adisesha (Ph. D) 6 Truth Table A variable used in Boolean algebra or Boolean equation can have only one of two variables. The two values are FALSE (0) and TRUE (1) ➢ A truth table is a mathematical table used in logic to computer functional values of logical expressions. ➢ A truth table is a table whose columns are statements and whose rows are possible scenarios. ➢ Example: Consider the logical expression ❖ Logical Statement: Sports = “Sunny can Play Cricket OR Football” ❖ Y = A OR B (Logical Variables: Y, A, B, Logical Operator OR) A=Cricket B=Football Y=A OR B 0 0 0 0 1 1 1 0 1 1 1 1
  • 7. Boolean Algebra Prof. K. Adisesha (Ph. D) 7 Logical Operators There are three logical operator, AND, OR and NOT. ➢ These operators are now used in computer construction known as switching circuits. ➢ B = {0, 1} and two binary operators, ‘+’ and ‘.’ ➢ The rules of operations: AND, OR and NOT. ❖ Complement: ~X (opposite of X) ❖ AND : X × Y ❖ OR : X + Y
  • 8. Logical Operators Prof. K. Adisesha (Ph. D) 8 AND Operator The operation performed by AND operator is called logical multiplication. ➢ The AND operator is read as “If and Only If”. This operator operates on two or more variables. ➢ The symbol we use for it is ‘.’ ➢ Example: X . Y can be read as X AND Y ➢ The Truth table, Venn diagram and the Circuit diagram for the AND operator is.
  • 9. Logical Operators Prof. K. Adisesha (Ph. D) 9 OR Operator The operation performed by OR operator is called logical addition. ➢ The OR operator is read as “If at-least One”. This operator operates on two or more variables. ➢ The symbol we use for it is ‘+’. ➢ Example: X + Y can be read as X OR Y ➢ The Truth table, Venn diagram and the Circuit diagram for the OR operator is.
  • 10. Logical Operators Prof. K. Adisesha (Ph. D) NOT Operator The operation performed by Not operator is called complementation. ➢ The Not operator is a unary operator. This operator operates on single variable. ➢ The symbol we use for it is bar. ❖ ~𝐗 means complementation of X ❖ If X=1 then ~X =0 If X=0 then, ~X =1 ➢ The Truth table, Venn diagram and the Circuit diagram for the NOT operator is. 10
  • 11. Boolean Theorems Prof. K. Adisesha (Ph. D) Basic Boolean Theorems : 11
  • 12. Boolean Theorems Prof. K. Adisesha (Ph. D) Basic Postulates and Theorems : 12
  • 13. Boolean Theorems Prof. K. Adisesha (Ph. D) Principle of duality The principle of duality states that every algebraic expression deducible from the postulates of Boolean algebra, remains valid if the operators identity elements are interchanged: ➢ To form the dual of an expression, replace all + operators with . operators, all . operators with + operators, all ones with zeros, and all zeros with ones. ➢ Form the dual of the expression ❖ (A+1)=(A.0) ❖ a + (b.c) = (a + b).(a + c) ➢ Following the replacement rules: ❖ a(b + c) = a.b + a.c ➢ Take care not to alter the location of the parentheses if they are present. 13
  • 14. Boolean Theorems Prof. K. Adisesha (Ph. D) Idempotences Law: Idempotences Law states that when a variable is combines with itself using OR or AND operator, the output is the same variable”. 14
  • 15. Boolean Theorems Prof. K. Adisesha (Ph. D) Identity Law: Identity Law states that when a variable is combines with 0 or 1 itself using OR or AND operator, the output is the 0 or 1”. 15
  • 16. Boolean Theorems Prof. K. Adisesha (Ph. D) Absorption Law: “This law enables a reduction of complicated expression to a simpler one by absorbing common terms”. 16
  • 17. Boolean Theorems Prof. K. Adisesha (Ph. D) De-Morgan’s Theorem: Stated by De-Morgan has two theorems: ➢ Theorem 5(a): “When the OR sum of two variables is inverted, this is same as inverting each variable individually and then AND ing these inverted variables” ❖ (x + y)’ = x’y’ ➢ Theorem 5(b): “When the AND product of two variables is inverted, this is same as inverting each variable individually and then OR ing these inverted variables” ❖ (xy)’ = x’ + y’ ➢ Can be proved by means of: ❖ Truth table or Algebraically 17
  • 18. Boolean Theorems Prof. K. Adisesha (Ph. D) De-Morgan’s Theorem: Stated by De-Morgan has two theorems: ➢ Proof by means of truth table: ❖ (x + y)’ = x’y’ (xy)’ = x’ + y’ 18 x y x’ y’ x+y (x+y)’ x’y’ xy x’+y' (xy)’ 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0
  • 19. Boolean Theorems Prof. K. Adisesha (Ph. D) De-Morgan’s Theorem: ➢ Proof by means of Algebraically: ❖ (x + y)’ = x’y’ 19
  • 20. Boolean Theorems Prof. K. Adisesha (Ph. D) De-Morgan’s Theorem: ➢ Proof by means of Algebraically: ❖ (xy)’ = x’ + y’ 20
  • 21. Boolean Expression Prof. K. Adisesha (Ph. D) Boolean Functions: ➢ A Boolean function consists of various constraints: ❖ Binary variables ❖ Binary operators OR and AND ❖ Unary operator NOT ❖ Parentheses ➢ Examples ❖ F1= x y z' ❖ F2 = x + y'z ❖ F3 = x' y' z + x' y z + x y' ❖ F4 = x y' + x' z 21
  • 22. Boolean Expression Prof. K. Adisesha (Ph. D) Simplification of Boolean Expression: Simplification of Boolean expression can be achieved by two popular methods: ➢ Algebraic Manipulation ➢ Karnaugh Maps (K Map) 22
  • 23. Boolean Expression Prof. K. Adisesha (Ph. D) Operator Precedence The operator precedence for evaluating Boolean Expression is: ➢ Parentheses ➢ NOT ➢ AND ➢ OR ➢ Examples ❖ x z’ + y ❖ (x y + z)' 23
  • 24. Boolean Expression Prof. K. Adisesha (Ph. D) Evaluation of Boolean Expression using Truth Table To create a truth table, follow the steps given below. ➢ Step 1: Determine the number of variables, for n variables create a table with 2n rows. ❖ For two variables i.e. X, Y then truth table will need 2^2 or 4 rows. ❖ For three variables i.e. X, Y, Z, then truth table will need 2^3 or 8 rows. ➢ Step 2: List the variables and every combination of 1 (TRUE) and 0 (FALSE) for the given variables ➢ Step 3: Create a new column for each term of the statement or argument. ➢ Step 4: If two statements have the same truth values, then they are equivalent. 24
  • 25. Boolean Expression Prof. K. Adisesha (Ph. D) Evaluation of Boolean Expression Consider the following Boolean Expression F=X+Y. ➢ Step 1: This expression as two variables X and Y, then 2^2 or 4 rows. ➢ Step 2: List the variables and every combination of X and Y. ➢ Step 3: The final column contain the values of F=X+ Y. 25
  • 26. Boolean Expression Prof. K. Adisesha (Ph. D) Evaluation of Boolean Expression Consider the following Boolean Expression: ➢ The truth table for the Boolean function: is shown at the right. ➢ To make evaluation of the Boolean function easier, the truth table contains extra (shaded) columns to hold evaluations of subparts of the function. 26
  • 27. Boolean Expression Prof. K. Adisesha (Ph. D) Simplification of Boolean Expression: Algebraic Manipulation: ➢ To minimize Boolean expressions ❖ Literal: single variable in a term (complemented or uncomplemented ) (an input to a gate) ❖ Term: an implementation with a gate ❖ The minimization of the number of literals and the number of terms → a circuit with less equipment ❖ It is a hard problem (no specific rules to follow) ➢ Example 2.1 ❖ x(x'+y) = xx' + xy = 0+xy = xy ❖ x+x'y = (x+x')(x+y) = 1 (x+y) = x+y 27
  • 28. Boolean Expression Prof. K. Adisesha (Ph. D) Simplification of Boolean Expression by Algebraic Manipulation: ➢ Example: 28
  • 29. Boolean Expression Prof. K. Adisesha (Ph. D) Simplification of Boolean Expression by Algebraic Manipulation: ➢ Example: 29
  • 30. Boolean Expression Prof. K. Adisesha (Ph. D) Simplification of Boolean Expression by Algebraic Manipulation: ➢ Example: 30
  • 31. Boolean Expression Prof. K. Adisesha (Ph. D) Canonical and Standard Forms : The two canonical forms of Boolean algebra are basic forms that one obtains from reading a given function from the truth table. ➢ We do not use it, because each minterm or maxterm must contain, by definition, all the variables, either complemented or uncomplemented. ➢ Standard forms: the terms that form the function may obtain one, two, or any number of literals. ❖ Sum of products: F1 = y' + xy+ x'yz' ❖ Product of sums: F2 = x(y'+z)(x'+y+z') 31
  • 32. Boolean Expression Prof. K. Adisesha (Ph. D) Canonical and Standard Forms : Minterms and Maxterms ➢ Boolean expression expressed as sum of Minterms or product of Maxterms are called canonical forms. ❖ The Minterm canonical expression is the Sum of all products (SOP) ❖ The maxterm canonical expression is the product of all Sum terms (POS). ➢ For example, the following expressions are the Minterm canonical form and Maxterm canonical form of two variables X and Y. ❖ Minterm Canonical = f(X, Y) = X’Y’ + X’ Y +X Y’+ X Y ❖ Maxterm Canonical = f(X, Y) = (X+Y).(X +Y’).(X’+Y’) 32
  • 33. Boolean Expression Prof. K. Adisesha (Ph. D) Canonical and Standard Forms : Minterms and Maxterms ➢ The minterms that produce a (0) ❖ f1' = m0 + m2 +m3 + m5 + m6 = x'y'z'+x'yz'+x'yz+xy'z+xyz' ❖ f1 = (f1')' = m’0 . m’2 . m’3 . m’5 . m’6 (Complement of minterms) ➢ The maxterms that produce a (1) ❖ = (x+y+z)(x+y'+z) (x+y'+z') (x'+y+z')(x'+y'+z) = M0, M2, M3, M5, M6 ❖ f2 = (x+y+z)(x+y+z')(x+y'+z)(x'+y+z)=M0, M1, M2, M4 ➢ Any Boolean function can be expressed as ❖ A sum of minterms (“sum” meaning the ORing of terms). ❖ A product of maxterms (“product” meaning the ANDing of terms). ❖ Both Boolean functions are said to be in Canonical form. 33
  • 34. Boolean Expression Prof. K. Adisesha (Ph. D) Minterms and Maxterms: Each maxterm is the complement of its corresponding minterm, and vice versa 34
  • 35. Boolean Expression Prof. K. Adisesha (Ph. D) Minterms and Maxterms for three variables: 35
  • 36. Boolean Expression Prof. K. Adisesha (Ph. D) Minterms and Maxterms: Any Boolean function can be expressed by: ➢ A truth table ➢ Sum of minterms ➢ f1 = x'y'z + xy'z' + xyz = m1 + m4 +m7 = S(1, 4, 7) (Minterms) ➢ f2 = x'yz+ xy'z + xyz'+xyz = m3 + m5 +m6 + m7 =P(3,5,6,7) (Minterms) 36
  • 37. Boolean Expression Prof. K. Adisesha (Ph. D) Minterms or Sum of Products (SOP): The Minterm canonical expression is the Sum of all products (SOP) ➢ Sum of minterms: there are 2n minterms ➢ Example 4: Express F = A+BC’ as a sum of minterms. ➢ F(A, B, C) = Σ(1, 4, 5, 6, 7) 37
  • 38. Boolean Expression Prof. K. Adisesha (Ph. D) Maxterms or Product of Sum (POS): The maxterm canonical expression is the product of all Sum terms (POS) ➢ Product of Sum terms : there are 2n minterms ➢ Example : F = xy + x'z as a product of maxterms. ➢ F(x, y, z) = Π(0, 2, 4, 5) 38
  • 39. Boolean Expression Prof. K. Adisesha (Ph. D) Conversion between Canonical Forms: The complement of a function expressed as the sum of minterms equals the sum of minterms missing from the original function. ➢ Minterm Canonical ❖ F(A, B, C) = Σ(1, 4, 5, 6, 7) ❖ Thus, F'(A, B, C) = Σ(0, 2, 3) = m0 + m2 +m3 ➢ By De-Morgan's theorem ➢ Maxterm Canonical ❖ F(A, B, C) = (m0 + m2 +m3)' = M0 M2 M3 = Π(0, 2, 3) ❖ F'(A, B, C) =Π (1, 4, 5, 6, 7) ➢ Interchange the symbols Σ of 1’s and Π of 0’s and list those numbers missing from the original form. 39
  • 40. Boolean Expression Prof. K. Adisesha (Ph. D) Conversion between Canonical Forms: Two different ways to specify the same function f of three variables. ➢ Minterm Canonical ❖ SOP Form ❖ f(x,y,z) = Σ m(1, 3, 6, 7) ➢ Maxterm Canonical ❖ POS Form ❖ f(x,y,z) = Π M(0, 2, 4, 5) 40
  • 41. Boolean Expression Prof. K. Adisesha (Ph. D) Conversion of SOP into Canonical form: Convert the Boolean function f(X, Y) = X + X Y into canonical form. ➢ Solution: ❖ The given Boolean function f(X, Y) = X + X Y ------ (i) ❖ It has two variables and sum of two Minterms. The first term X is missing one variable. ❖ So to make it of two variables it can be multiplied by (Y+Y’)=1. ❖ Therefore, X = X (Y+Y’) =XY+XY’ ❖ Substitute the value of X in (i) we get f(X, Y) = X Y+X Y’ + X Y ❖ Here, the term X Y appear twice, it is possible to remove one of them. f(X, Y) = X Y+X Y’ ❖ Therefore: SOP Expression is f(X, Y) = Σ (2, 3) 41
  • 42. Boolean Expression Prof. K. Adisesha (Ph. D) Conversion of POS into Canonical form: Convert the Boolean function F(X, Y, Z) = X+Y (Y+Z) into canonical form. ➢ Solution: ❖ The given Boolean function F(X,Y,Z) = (X+Y).(Y+Z) ------(i) ❖ It has three variables and product of two Maxterms. Each Maxterm is missing one variable. ❖ The first term can be written as X+Y = (X+Y+Z. Z ) Since Z. Z =0 ❖ Using distributive law (X + YZ) = (X + Y) (X + Z), we can write X+Y = (X+Y+Z) (X+Y+ Z ) ---(ii) ❖ The Second term can be written as Y + Z = (Y+Z+X. X ) Y+Z = (Y+Z+X) (Y+Z+X ) ----(iii) ❖ Substitute (ii) and (iii) in (i) we get F(X, Y, Z) = (X+Y+Z) (X+Y+ Z ) (Y+Z+X) (Y+Z+X ) ❖ Therefore: POS Expression is F(X, Y, Z) = π (0, 1, 4) 42
  • 43. Karnaugh Map Prof. K. Adisesha (Ph. D) Karnaugh Map: A graphical display of the fundamental products in a truth table. ➢ Fundamental Product: The logical product of variables and complements that produces a high output for a given input condition. ➢ The map method provides simple procedure for minimizing the Boolean function. ➢ The map method was first proposed by E.W. Veitch in 1952 known as “Veitch Diagram”. ➢ In 1953, Maurice Karnaugh proposed “Karnaugh Map” also known as “K-Map”. 43
  • 44. Karnaugh Map Prof. K. Adisesha (Ph. D) Construction of K-Map : The K-Map is a pictorial representation of a truth table made up of squares. ➢ Each square represents a Minterm or Maxterm. ➢ The Karnaugh map is completed by entering a '1‘(or ‘0’) in each of the appropriate cells. ➢ A K-Map for n variables is made up of 2n squares. ❖ Single Variable K-Map: The map consists of 2 squares (i.e. 2n square, 21 = 2 square) ❖ Two Variable K-Map : The map consists of 4 squares (i.e. 2n square, 22 = 4 square) ❖ Three Variable K-Map: The map consists of 8 squares (i.e. 2n square, 23 = 8 square) ❖ Four Variable K-Map : The map consists of 16 squares (i.e. 2n square, 24 = 16 square) 44
  • 45. Karnaugh Map Prof. K. Adisesha (Ph. D) Construction of K-Map : Karnaugh maps, or K-maps, are often used to simplify logic problems with 2, 3 or 4 variables. ➢ Within the map, adjacent cells containing 1's (or 0’s) are grouped together in twos, fours, or eights. ➢ For the case of 2 variables, we form a map consisting of 22 =4 cells ➢ as shown in Figure . 45
  • 46. Karnaugh Map Prof. K. Adisesha (Ph. D) Construction of K-Map : Karnaugh maps, or K-maps, are often used to simplify logic problems with 3 or 4 variables. 46 AB C 00 01 11 10 0 1 CBA CBA CAB CBA CBA BCA ABC CBA 0 2 6 4 531 7 3 Variables Cell = 23=8
  • 47. Digital Logic Gates Prof. K. Adisesha (Ph. D) 47 Logic Gates: A logic gate is an idealized model of computation or physical electronic device implementing a Boolean function. ➢ A logical operation performed on one or more binary inputs that produces a single binary output. ➢ Types of Logic Gates: ➢ Basic Gates ➢ Universal Gates ➢ Exclusive Gates
  • 48. Types of Logic Gates: Basic Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 48
  • 49. Types of Logic Gates: Universal Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 49
  • 50. Types of Logic Gates: Exclusive Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 50
  • 51. NAND Gate is a Universal Gate Prof. K. Adisesha (Ph. D) 51 To prove that any Boolean function can be implemented using only NAND gates, we will show that the AND, OR, and NOT operations can be performed using only these gates
  • 52. NOR Gate is a Universal Gate Prof. K. Adisesha (Ph. D) 52 To prove that any Boolean function can be implemented using only NOR gates, we will show that the AND, OR, and NOT operations can be performed using only these gates
  • 53. Realization of Basic Gates using Universal Gates: NAND Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 53
  • 54. Realization of Basic Gates using Universal Gates: NOR Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 54
  • 55. Realization of Exclusive Gates using Universal Gates: Using NAND Gates: Using NOR Gates: Digital Logic Gates Prof. K. Adisesha (Ph. D) 55
  • 56. Binary Adder: In many computers and other kinds of processors adders are used in the arithmetic logic units or ALU. ➢ An adder is a device that will add together two bits and give the result as the output. ➢ There are two kinds of adders – ❖ Half adders: A half adder just adds two bits together and gives a two-bit output ❖ Full adders: A full adder adds two inputs and a carried input from another adder, and also gives a two-bit output. Digital Logic Gates Prof. K. Adisesha (Ph. D) 56
  • 57. Realization of Half Adder Circuits using Logic Gates: Half adders: A half adder just adds two bits together and gives a two-bit output Digital Logic Gates Prof. K. Adisesha (Ph. D) 57
  • 58. Realization of Full Adder Circuits using Logic Gates: Full adders: A full adder adds two inputs and a carried input from another adder, and also gives a two-bit output. Digital Logic Gates Prof. K. Adisesha (Ph. D) 58
  • 59. Digital Logic Gates Prof. K. Adisesha (Ph. D) 59 Integrated Circuits: A collection of one or more gates fabricated on a single silicon chip is called an integrated circuit (IC). ➢ ICs were classified by size: ❖ SSI - small scale integration - 1~20 gates ❖ MSI - medium scale integration - 20~200 gates ❖ LSI - large scale integration - 200~200,000 gates ❖ VLSI - very large scale integration - over 1M transistors ➢ Pentium-III - 40 million transistors
  • 60. Digital Logic Gates Prof. K. Adisesha (Ph. D) 60 Integrated Circuits:
  • 61. Digital Logic Gates Prof. K. Adisesha (Ph. D) 61 DIP Packages
  • 62. Digital Logic Gates Prof. K. Adisesha (Ph. D) 62 Gates in ICs
  • 63. NOR Gate is a Universal Gate Prof. K. Adisesha (Ph. D) 63 Implementation with logic gates
  • 64. Boolean Functions Prof. K. Adisesha (Ph. D) 64 Implementation with logic gates
  • 65. Boolean Functions Prof. K. Adisesha (Ph. D) 65 Multiple Inputs Gates Multiple input NOR = a complement of OR gate, Multiple input NAND = a complement of AND. ➢ The cascaded NAND operations = sum of products. ➢ The cascaded NOR operations = product of sums.
  • 66. Boolean Functions Prof. K. Adisesha (Ph. D) 66 Multiple Inputs Gates The XOR and XNOR gates are commutative and associative. ➢ XOR is an odd function: it is equal to 1 if the inputs variables have an odd number of 1's.
  • 67. Boolean Functions 67 Positive and Negative Logic The XOR and XNOR gates are commutative and associative. ➢ Positive and Negative Logic ❖ Two signal values <=> two logic values ❖ Positive logic: H=1; L=0 ❖ Negative logic: H=0; L=1 Prof. K. Adisesha (Ph. D)
  • 68. Discussion Prof. K. Adisesha (Ph. D) 68 Queries ? Prof. K. Adisesha 9449081542