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. 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.
6
Prof. K Adisesha
7. 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:
7
Prof. K Adisesha
9. 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:
9
Prof. K Adisesha
11. 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:
11
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. 13
Prof. K Adisesha
14. 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.
14
Prof. K Adisesha
15. 15
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
16. OPERATOR PRECEDENCE
The operator precedence for evaluating Boolean
Expression is
Parentheses
NOT
AND
OR
Examples
x y' + z
(x y + z)'
16
Prof. K Adisesha
17. 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
17
Prof. K Adisesha
18. 18
Figure 2.5 (In book) Digital logic gates
DIGITAL LOGIC GATES
Prof. K Adisesha
25. 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. 25
Prof. K Adisesha
26. 26
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”.
28. ABSORPTION LAW: “THIS LAW ENABLES A REDUCTION OF
COMPLICATED EXPRESSION TO A SIMPLER ONE BY ABSORBING
COMMON TERMS”.
28
Prof. K Adisesha
29. 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 Adisesha29
33. 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.
33
Prof. K Adisesha
35. 35
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
38. 38
CANONICAL AND STANDARD FORMS
Minterms and Maxterms
A minterm (standard product): an AND term
consists of all literals in their normal form or in
their complement form.
For example, two binary variables x and y,
xy, xy', x'y, x'y'
It is also called a standard product.
n variables can be combined to form 2n
minterms.
A maxterm (standard sum): an OR term
It is also called a standard sum.
2n
maxterms.
Prof. K Adisesha
39. 39
MINTERMS AND MAXTERMS
Each maxterm is the complement of its
corresponding minterm, and vice versa.
Prof. K Adisesha
40. 40
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
41. 41
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
42. 42
SUM OF MINTERMS
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
43. 43
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
46. MINTERMS AND MAXTERMS
(WITH THREE VARIABLES)
The function is
1 for these rows
The function is
0 for these rows
47. 47
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
48. TWO DIFFERENT WAYS TO SPECIFY THE SAME
FUNCTION F OF THREE VARIABLES
f(x1, x2, x3) = Σ m(0, 2, 4, 5, 6, 7)
f(x1, x2, x3) = Π M(1, 3)
49. 49
Example
F = xy + xz
F(x, y, z) = S(1, 3, 6, 7)
F(x, y, z) = P (0, 2, 4, 5)
Prof. K Adisesha
50. 50
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 uncomplementd.
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
52. 52
KARNAUGH MAP:
o A graphical display of the fundamental products in a
truth table.
o Instead of using Boolean algebra simplification
techniques, you can transfer logic values from a
Boolean statement or a truth table into a Karnaugh
map.
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
53. 53
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
54. 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
57. 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
58. 58
Figure 2.5 (In book) Digital logic gates
DIGITAL LOGIC GATES
Prof. K Adisesha
61. 61
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
62. 62
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
63. 63
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
64. 64
MULTIPLE INPUTS
NAND and NOR are commutative but not associative
→ they are not extendable.
Figure 2.6 Demonstrating the nonassociativity of the NOR operator;
(x ↓ y( ↓ z ≠ x ↓)y ↓ z)
z
Prof. K Adisesha
65. 65
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 2.7 Multiple-input and cascaded NOR and NAND gates
Prof. K Adisesha
66. 66
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
67. 67
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