SlideShare a Scribd company logo
BOOLEAN ALGEBRA
AND
LOGIC GATE
BY
Prof. K Adisesha
OUTLINE OF BOOLEAN ALGEBRA
2
 2.1 Introduction to Boolean algebra
 2.2 History of Boolean algebra
 2.3 Logical Operators
 2.4 Basic theorems and properties of Boolean algebra
 2.5 Boolean functions
 2.6 Canonical and standard forms
 2.7 Digital logic gates
Prof. K Adisesha
INTRODUCTION
 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”. 3
Prof. K Adisesha
GEORGE BOOLE
 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)
4
Prof. K Adisesha
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.
5
Prof. K Adisesha
TRUTH TABLE
 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)
6
Prof. K Adisesha
A=Cricket B=Football Y=A OR B
0 0 0
0 1 1
1 0 1
1 1 1
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.
7
Prof. K Adisesha
AND OPERATOR
 The AND operator is a binary operator. This operator
operates on two variables.
 The operation performed by AND operator is called
logical multiplication.
 The symbol we use for it is ‘.’
 Example: X . Y can be read as X AND Y
 The Truth table and the Venn diagram for the NOT
operator is:
8
Prof. K Adisesha
9
Prof. K Adisesha
OR OPERATOR
 The OR operator is a binary operator. This operator
operates on two variables.
 The operation performed by OR operator is called
logical addition.
 The symbol we use for it is ‘+’.
 Example: X + Y can be read as X OR Y
 The Truth table and the Venn diagram for the NOT
operator is:
10
Prof. K Adisesha
11
Prof. K Adisesha
NOT OPERATOR
 The Not operator is a unary operator. This operator
operates on single variable.
 The operation performed by Not operator is called
complementation.
 The symbol we use for it is bar.
 𝐗 means complementation of X
 If X=1, X =0 If X=0, X =1
 The Truth table and the Venn diagram for the NOT
operator is:
12
Prof. K Adisesha
13
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 22 or
4 rows.
 For three variables i.e. X, Y, Z, then truth table will need
23 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. 14
Prof. K Adisesha
CONSIDER THE FOLLOWING BOOLEAN
EXPRESSION F=X+Y
 Step 1: This expression as two variables X and Y,
then 22 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.
15
Prof. K Adisesha
16
CONSIDER THE FOLLOWING BOOLEAN
EXPRESSION BOOLEAN ALGEBRA
 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.
Prof. K Adisesha
OPERATOR PRECEDENCE
 The operator precedence for evaluating Boolean
Expression is
 Parentheses
 NOT
 AND
 OR
 Examples
 x y' + z
 (x y + z)'
17
Prof. K Adisesha
BOOLEAN FUNCTIONS
 A Boolean function
 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
18
Prof. K Adisesha
BASIC THEOREMS
19
Prof. K Adisesha
20
Prof. K Adisesha
DUALITY
 The principle of duality is an important concept. It 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 + (bc) = (a + b)(a + c)
 Following the replacement rules…
a(b + c) = ab + ac
 Take care not to alter the location of the parentheses if
they are present. 21
Prof. K Adisesha
22
Prof. K Adisesha
Indempotence Law:
“This law states that when a variable is combines with itself
using OR or AND operator, the output is the same variable”.
23
Prof. K Adisesha
ABSORPTION LAW:
“THIS LAW ENABLES A REDUCTION OF COMPLICATED
EXPRESSION TO A SIMPLER ONE BY ABSORBING COMMON TERMS”.
24
Prof. K Adisesha
DEMORGAN’S THEOREM
 Theorem 5(a):Statement: “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’
 By means of truth table
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
Prof. K Adisesha25
DEMORGAN’S FIRST THEOREM
26
FIRST LAW: “The complement of a logical sum equals the logical
product of the complements.
DEMORGAN’S SECOND THEOREM
27
SECOND LAW: “The complement of a logical product equals the
logical sum of the complements.
SIMPLIFICATION OF BOOLEAN EXPRESSION:
28
Simplification of Boolean expression can
be achieved by two popular methods:
o Algebraic Manipulation
o Karnaugh Maps (K Map)
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
1. x(x'+y) = xx' + xy = 0+xy = xy
2. x+x'y = (x+x')(x+y) = 1 (x+y) = x+y
3. (x+y)(x+y') = x+xy+xy'+yy' = x(1+y+y') = x or x+yy’ = x+ 0 = x
4. xy + x'z + yz = xy + x'z + yz(x+x') = xy + x'z + yzx + yzx' = xy(1+z)
+ x'z(1+y) = xy +x'z
5. (x+y)(x'+z)(y+z) = (x+y)(x'+z), by duality from function 4.
29
Prof. K Adisesha
30
Examples
31
EXAMPLES
 Example 2.2
 F1' = (x'yz' + x'y'z)' = (x'yz')' (x'y'z)' = (x+y'+z) (x+y+z')
 F2' = [x(y'z'+yz)]' = x' + (y'z'+yz)' = x' + (y'z')' (yz)’
= x' + (y+z) (y'+z')
 Example 2.3: a simpler procedure
 Take the dual of the function and complement each
literal
1. F1 = x'yz' + x'y'z.
The dual of F1 is (x'+y+z') (x'+y'+z).
Complement each literal: (x+y'+z)(x+y+z') = F1'
2. F2 = x(y' z' + yz).
The dual of F2 is x+(y'+z') (y+z).
Complement each literal: x'+(y+z)(y' +z') = F2'
Prof. K Adisesha
32
Prof. K Adisesha
33
Prof. K Adisesha
34
CANONICAL AND STANDARD FORMS
Minterms and Maxterms
 Boolean expression expressed as sum of Minterms or
product of Maxterms are called canonical forms.
 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’)
 The Minterm canonical expression is the sum of all
Minterms.
 The maxterm canonical expression is the product of all
Maxterms.
Prof. K Adisesha
35
MINTERMS AND MAXTERMS
 Each maxterm is the complement of its corresponding
minterm, and vice versa.
Prof. K Adisesha
36
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 (Minterms)
Prof. K Adisesha
37
MINTERMS AND MAXTERMS
 The complement of a Boolean function
 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
= (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)=M0M1M2M4
 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.
Prof. K Adisesha
38
SUM OF MINTERMS (SOP)
 Sum of minterms: there are 2n minterms
 Example 4: Express F = A+BC' as a sum of minterms.
 F(A, B, C) = S(1, 4, 5, 6, 7)
Prof. K Adisesha
39
PRODUCT OF MAXTERMS
 Product of maxterms: there are 2n maxterms
 Example 5: express F = xy + x'z as a product of
maxterms.
F(x, y, z) = P(0, 2, 4, 5)
Prof. K Adisesha
MINTERMS AND MAXTERMS
(WITH THREE VARIABLES)
[ Figure 2.22 from the textbook
MINTERMS AND MAXTERMS
(WITH THREE VARIABLES)
The function is
1 for these rows
MINTERMS AND MAXTERMS
(WITH THREE VARIABLES)
The function is
1 for these rows
The function is
0 for these rows
43
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.
 F(A, B, C) = S(1, 4, 5, 6, 7)
 Thus, F'(A, B, C) = S(0, 2, 3) = m0 + m2 +m3
 By DeMorgan's theorem
F(A, B, C) = (m0 + m2 +m3)' = M0 M2 M3 = P(0, 2, 3)
F'(A, B, C) =P (1, 4, 5, 6, 7)
 mj' = Mj
 Interchange the symbols S and P and list those
numbers missing from the original form
 S of 1's
 P of 0's
Prof. K Adisesha
TWO DIFFERENT WAYS TO SPECIFY THE SAME
FUNCTION F OF THREE VARIABLES
SOP Form
f(x1, x2, x3) = Σ m(0, 2, 4, 5, 6, 7)
POS Form
f(x1, x2, x3) = Π M(1, 3)
45
 Example
 F = xy + xz
 F(x, y, z) = S(1, 3, 6, 7)
 F(x, y, z) = P (0, 2, 4, 5)
Prof. K Adisesha
46
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')
Prof. K Adisesha
47
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)
Prof. K Adisesha
48
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)
Prof. K Adisesha
49
KARNAUGH MAP:
o A graphical display of the fundamental products in a
truth table.
o Fundamental Product: The logical product of variables
and complements that produces a high output for a
given input condition.
o The map method provides simple procedure for
minimizing the Boolean function.
o The map method was first proposed by E.W. Veitch in
1952 known as “Veitch Diagram”.
o In 1953, Maurice Karnaugh proposed “Karnaugh Map”
also known as “K-Map”.
Prof. K Adisesha
50
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.
• 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)
Prof. K Adisesha
KARNAUGH MAPS
 Karnaugh maps, or K-maps, are often used to simplify logic problems
with 2, 3 or 4 variables.
BA
For the case of 2 variables, we form a map consisting of 22=4 cells
as shown in Figure
A
B
0 1
0
1
Cell = 2n ,where n is a number of variables
00 10
01 11
A
B
0 1
0
1
A
B
0 1
0
1
BA
BA AB
BA BA
BA BA
Maxterm Minterm
0 2
1 3
KARNAUGH MAPS
 3 variables Karnaugh map
AB
C 00 01 11 10
0
1
CBA CBA CAB CBA
CBA BCA ABC CBA
0 2 6 4
531 7
Cell = 23=8
KARNAUGH MAPS
 4 variables Karnaugh map
AB
CD 00 01 11 10
00
01
11
10
5
3
1
7
62
0 4
9
15
13
11
1014
12 8
 The Karnaugh map is completed by entering a
'1‘(or ‘0’) in each of the appropriate cells.
 Within the map, adjacent cells containing 1's
(or 0’s) are grouped together in twos, fours, or
eights.
KARNAUGH MAPS
55
Figure: Digital logic gates
DIGITAL LOGIC GATES
Prof. K Adisesha
56
Figure: Digital logic gates
Summary of Logic Gates
Prof. K Adisesha
57
Prof. K Adisesha
58
NAND Gate is a Universal Gate:
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
59
NAND Gate is a Universal Gate:
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
BOOLEAN FUNCTIONS
 Implementation with logic gates
F4 = x y' + x' z
F3 = x' y' z + x' y z + x y'
F2 = x + y'z
60
Prof. K Adisesha
61
IMPLEMENTATION
 Two-level implementation
 Multi-level implementation
nonstandard form standard form
F1 = y' + xy+ x'yz' F2 = x(y'+z)(x'+y+z')
Prof. K Adisesha
62
MULTIPLE INPUTS
 Extension to multiple inputs
 A gate can be extended to more than two inputs.
If its binary operation is commutative and
associative.
 AND and OR are commutative and associative.
OR
 x+y = y+x
 (x+y)+z = x+(y+z) = x+y+z
AND
 xy = yx
 (x y)z = x(y z) = x y z
Prof. K Adisesha
63
MULTIPLE INPUTS
 NAND and NOR are commutative but not associative →
they are not extendable.
Figure: Demonstrating the nonassociativity of the NOR operator; (x ↓
y) ↓ z ≠ x ↓(y ↓ z)
z
Prof. K Adisesha
64
MULTIPLE INPUTS
 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.
Figure: Multiple-input and cascaded NOR and NAND gates
Prof. K Adisesha
65
 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.
Figure 2.8 3-input XOR gate
Prof. K Adisesha
66
POSITIVE AND NEGATIVE LOGIC
 Positive and Negative Logic
 Two signal values <=> two
logic values
 Positive logic: H=1; L=0
 Negative logic: H=0; L=1
 The positive logic is used in
this book
Figure 2.9 Signal assignment and logic polarity
Prof. K Adisesha
67
Figure 2.10 Demonstration of positive and negative logic
POSITIVE AND NEGATIVE LOGIC
Prof. K Adisesha
THANK YOU
68
Prof. K Adisesha

More Related Content

Boolean algebra and logic gates

  • 2. OUTLINE OF BOOLEAN ALGEBRA 2  2.1 Introduction to Boolean algebra  2.2 History of Boolean algebra  2.3 Logical Operators  2.4 Basic theorems and properties of Boolean algebra  2.5 Boolean functions  2.6 Canonical and standard forms  2.7 Digital logic gates Prof. K Adisesha
  • 3. INTRODUCTION  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”. 3 Prof. K Adisesha
  • 4. GEORGE BOOLE  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) 4 Prof. K Adisesha
  • 5. 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. 5 Prof. K Adisesha
  • 6. TRUTH TABLE  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) 6 Prof. K Adisesha A=Cricket B=Football Y=A OR B 0 0 0 0 1 1 1 0 1 1 1 1
  • 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. 7 Prof. K Adisesha
  • 8. AND OPERATOR  The AND operator is a binary operator. This operator operates on two variables.  The operation performed by AND operator is called logical multiplication.  The symbol we use for it is ‘.’  Example: X . Y can be read as X AND Y  The Truth table and the Venn diagram for the NOT operator is: 8 Prof. K Adisesha
  • 10. OR OPERATOR  The OR operator is a binary operator. This operator operates on two variables.  The operation performed by OR operator is called logical addition.  The symbol we use for it is ‘+’.  Example: X + Y can be read as X OR Y  The Truth table and the Venn diagram for the NOT operator is: 10 Prof. K Adisesha
  • 12. NOT OPERATOR  The Not operator is a unary operator. This operator operates on single variable.  The operation performed by Not operator is called complementation.  The symbol we use for it is bar.  𝐗 means complementation of X  If X=1, X =0 If X=0, X =1  The Truth table and the Venn diagram for the NOT operator is: 12 Prof. K Adisesha
  • 13. 13
  • 14. 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 22 or 4 rows.  For three variables i.e. X, Y, Z, then truth table will need 23 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. 14 Prof. K Adisesha
  • 15. CONSIDER THE FOLLOWING BOOLEAN EXPRESSION F=X+Y  Step 1: This expression as two variables X and Y, then 22 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. 15 Prof. K Adisesha
  • 16. 16 CONSIDER THE FOLLOWING BOOLEAN EXPRESSION BOOLEAN ALGEBRA  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. Prof. K Adisesha
  • 17. OPERATOR PRECEDENCE  The operator precedence for evaluating Boolean Expression is  Parentheses  NOT  AND  OR  Examples  x y' + z  (x y + z)' 17 Prof. K Adisesha
  • 18. BOOLEAN FUNCTIONS  A Boolean function  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 18 Prof. K Adisesha
  • 21. DUALITY  The principle of duality is an important concept. It 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 + (bc) = (a + b)(a + c)  Following the replacement rules… a(b + c) = ab + ac  Take care not to alter the location of the parentheses if they are present. 21 Prof. K Adisesha
  • 22. 22 Prof. K Adisesha Indempotence Law: “This law states that when a variable is combines with itself using OR or AND operator, the output is the same variable”.
  • 24. ABSORPTION LAW: “THIS LAW ENABLES A REDUCTION OF COMPLICATED EXPRESSION TO A SIMPLER ONE BY ABSORBING COMMON TERMS”. 24 Prof. K Adisesha
  • 25. DEMORGAN’S THEOREM  Theorem 5(a):Statement: “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’  By means of truth table 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 Prof. K Adisesha25
  • 26. DEMORGAN’S FIRST THEOREM 26 FIRST LAW: “The complement of a logical sum equals the logical product of the complements.
  • 27. DEMORGAN’S SECOND THEOREM 27 SECOND LAW: “The complement of a logical product equals the logical sum of the complements.
  • 28. SIMPLIFICATION OF BOOLEAN EXPRESSION: 28 Simplification of Boolean expression can be achieved by two popular methods: o Algebraic Manipulation o Karnaugh Maps (K Map)
  • 29. 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 1. x(x'+y) = xx' + xy = 0+xy = xy 2. x+x'y = (x+x')(x+y) = 1 (x+y) = x+y 3. (x+y)(x+y') = x+xy+xy'+yy' = x(1+y+y') = x or x+yy’ = x+ 0 = x 4. xy + x'z + yz = xy + x'z + yz(x+x') = xy + x'z + yzx + yzx' = xy(1+z) + x'z(1+y) = xy +x'z 5. (x+y)(x'+z)(y+z) = (x+y)(x'+z), by duality from function 4. 29 Prof. K Adisesha
  • 31. 31 EXAMPLES  Example 2.2  F1' = (x'yz' + x'y'z)' = (x'yz')' (x'y'z)' = (x+y'+z) (x+y+z')  F2' = [x(y'z'+yz)]' = x' + (y'z'+yz)' = x' + (y'z')' (yz)’ = x' + (y+z) (y'+z')  Example 2.3: a simpler procedure  Take the dual of the function and complement each literal 1. F1 = x'yz' + x'y'z. The dual of F1 is (x'+y+z') (x'+y'+z). Complement each literal: (x+y'+z)(x+y+z') = F1' 2. F2 = x(y' z' + yz). The dual of F2 is x+(y'+z') (y+z). Complement each literal: x'+(y+z)(y' +z') = F2' Prof. K Adisesha
  • 34. 34 CANONICAL AND STANDARD FORMS Minterms and Maxterms  Boolean expression expressed as sum of Minterms or product of Maxterms are called canonical forms.  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’)  The Minterm canonical expression is the sum of all Minterms.  The maxterm canonical expression is the product of all Maxterms. Prof. K Adisesha
  • 35. 35 MINTERMS AND MAXTERMS  Each maxterm is the complement of its corresponding minterm, and vice versa. Prof. K Adisesha
  • 36. 36 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 (Minterms) Prof. K Adisesha
  • 37. 37 MINTERMS AND MAXTERMS  The complement of a Boolean function  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 = (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)=M0M1M2M4  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. Prof. K Adisesha
  • 38. 38 SUM OF MINTERMS (SOP)  Sum of minterms: there are 2n minterms  Example 4: Express F = A+BC' as a sum of minterms.  F(A, B, C) = S(1, 4, 5, 6, 7) Prof. K Adisesha
  • 39. 39 PRODUCT OF MAXTERMS  Product of maxterms: there are 2n maxterms  Example 5: express F = xy + x'z as a product of maxterms. F(x, y, z) = P(0, 2, 4, 5) Prof. K Adisesha
  • 40. MINTERMS AND MAXTERMS (WITH THREE VARIABLES) [ Figure 2.22 from the textbook
  • 41. MINTERMS AND MAXTERMS (WITH THREE VARIABLES) The function is 1 for these rows
  • 42. MINTERMS AND MAXTERMS (WITH THREE VARIABLES) The function is 1 for these rows The function is 0 for these rows
  • 43. 43 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.  F(A, B, C) = S(1, 4, 5, 6, 7)  Thus, F'(A, B, C) = S(0, 2, 3) = m0 + m2 +m3  By DeMorgan's theorem F(A, B, C) = (m0 + m2 +m3)' = M0 M2 M3 = P(0, 2, 3) F'(A, B, C) =P (1, 4, 5, 6, 7)  mj' = Mj  Interchange the symbols S and P and list those numbers missing from the original form  S of 1's  P of 0's Prof. K Adisesha
  • 44. TWO DIFFERENT WAYS TO SPECIFY THE SAME FUNCTION F OF THREE VARIABLES SOP Form f(x1, x2, x3) = Σ m(0, 2, 4, 5, 6, 7) POS Form f(x1, x2, x3) = Π M(1, 3)
  • 45. 45  Example  F = xy + xz  F(x, y, z) = S(1, 3, 6, 7)  F(x, y, z) = P (0, 2, 4, 5) Prof. K Adisesha
  • 46. 46 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') Prof. K Adisesha
  • 47. 47 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) Prof. K Adisesha
  • 48. 48 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) Prof. K Adisesha
  • 49. 49 KARNAUGH MAP: o A graphical display of the fundamental products in a truth table. o Fundamental Product: The logical product of variables and complements that produces a high output for a given input condition. o The map method provides simple procedure for minimizing the Boolean function. o The map method was first proposed by E.W. Veitch in 1952 known as “Veitch Diagram”. o In 1953, Maurice Karnaugh proposed “Karnaugh Map” also known as “K-Map”. Prof. K Adisesha
  • 50. 50 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. • 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) Prof. K Adisesha
  • 51. KARNAUGH MAPS  Karnaugh maps, or K-maps, are often used to simplify logic problems with 2, 3 or 4 variables. BA For the case of 2 variables, we form a map consisting of 22=4 cells as shown in Figure A B 0 1 0 1 Cell = 2n ,where n is a number of variables 00 10 01 11 A B 0 1 0 1 A B 0 1 0 1 BA BA AB BA BA BA BA Maxterm Minterm 0 2 1 3
  • 52. KARNAUGH MAPS  3 variables Karnaugh map AB C 00 01 11 10 0 1 CBA CBA CAB CBA CBA BCA ABC CBA 0 2 6 4 531 7 Cell = 23=8
  • 53. KARNAUGH MAPS  4 variables Karnaugh map AB CD 00 01 11 10 00 01 11 10 5 3 1 7 62 0 4 9 15 13 11 1014 12 8
  • 54.  The Karnaugh map is completed by entering a '1‘(or ‘0’) in each of the appropriate cells.  Within the map, adjacent cells containing 1's (or 0’s) are grouped together in twos, fours, or eights. KARNAUGH MAPS
  • 55. 55 Figure: Digital logic gates DIGITAL LOGIC GATES Prof. K Adisesha
  • 56. 56 Figure: Digital logic gates Summary of Logic Gates Prof. K Adisesha
  • 58. 58 NAND Gate is a Universal Gate: 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
  • 59. 59 NAND Gate is a Universal Gate: 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
  • 60. BOOLEAN FUNCTIONS  Implementation with logic gates F4 = x y' + x' z F3 = x' y' z + x' y z + x y' F2 = x + y'z 60 Prof. K Adisesha
  • 61. 61 IMPLEMENTATION  Two-level implementation  Multi-level implementation nonstandard form standard form F1 = y' + xy+ x'yz' F2 = x(y'+z)(x'+y+z') Prof. K Adisesha
  • 62. 62 MULTIPLE INPUTS  Extension to multiple inputs  A gate can be extended to more than two inputs. If its binary operation is commutative and associative.  AND and OR are commutative and associative. OR  x+y = y+x  (x+y)+z = x+(y+z) = x+y+z AND  xy = yx  (x y)z = x(y z) = x y z Prof. K Adisesha
  • 63. 63 MULTIPLE INPUTS  NAND and NOR are commutative but not associative → they are not extendable. Figure: Demonstrating the nonassociativity of the NOR operator; (x ↓ y) ↓ z ≠ x ↓(y ↓ z) z Prof. K Adisesha
  • 64. 64 MULTIPLE INPUTS  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. Figure: Multiple-input and cascaded NOR and NAND gates Prof. K Adisesha
  • 65. 65  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. Figure 2.8 3-input XOR gate Prof. K Adisesha
  • 66. 66 POSITIVE AND NEGATIVE LOGIC  Positive and Negative Logic  Two signal values <=> two logic values  Positive logic: H=1; L=0  Negative logic: H=0; L=1  The positive logic is used in this book Figure 2.9 Signal assignment and logic polarity Prof. K Adisesha
  • 67. 67 Figure 2.10 Demonstration of positive and negative logic POSITIVE AND NEGATIVE LOGIC Prof. K Adisesha