EEB341.Chapter03-BooleanAlgebra
EEB341.Chapter03-BooleanAlgebra
N Ditshego
Lecturer
Department of Electrical Engineering
University of Botswana
EEB 341
DIGITAL ELECTRONICS
CHAPTER 3
BOOLEAN ALGEBRA
1
Boolean algebra
• There are only two possible values for any quantity and for any
arithmetic operation 1 or 0
• It does not matter how many or few terms we add together,
either.
2
Addition in Boolean Algebra
3
Multiplication in Boolean Algebra
• Is same as in real-number algebra. Anything multiplied by 0
is 0, and anything multiplied by 1 remains unchanged
4
Axioms of Boolean Algebra
5
Single Variable Theorems
6
Two- and Three-Variable Properties
7
8
Proof of Demorgan’s Theorem (15a)
9
10
11
12
13
Logic Functions
14
Truth Tables
15
Truth Tables
A truth table defines the value of the output of a logic
function for each combination of the input variables.
16
3-input Truth Table
# A B C F(A,B,C)
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
3 variables → 23 = 8 rows
17
4-input Truth Table
# A B C D F(A,B,C,D)
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
…
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
4 variables → 24 = 16 rows
18
Truth Tables: Examples
F1 is completely defined by:
A B C F1(A,B,C) F2 is completely defined by:
0 0 0 0 A B C F2(A,B,C)
0 0 1 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 1 0 1 0 1
1 0 0 0 0 1 1 0
1 0 1 1 1 0 0 0
1 1 0 0 1 0 1 1
1 1 1 1 1 1 0 1
1 1 1 0
19
Boolean Expressions
A Boolean expression is composed of
Literals – variables and their complements
Logical operators
Examples
F1 = A.B.C + A'.B'.C + A.B'.C' + A'.B.C'
F2 = (A'+B+C).(A+B'+C).(A+B+C')
F3 = A'.(B+C) + B.(A+C')
20
Boolean Expressions
input variables.
21
Boolean Expressions: Example #1
Simple AND and OR Functions
F1(A,B,C) = A'.B.C'
when all literals = 1.
22
Boolean Expressions: Example #1
A B C A' B' C' F1 F2
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
23
Boolean Expressions: Example #2
More Complex Functions of ANDs and ORs
24
Boolean Expressions: Example #2
A B C A'C BC' AB'C' F(A,B,C)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
25
Boolean Expressions: Example #3
More Complex Functions of ANDs and ORs
F(A,B,C) = (A+B').(A'+C).(A+B'+C')
An OR term = 1
An AND function = 1 when any literal = 1.
when all terms = 1.
26
Boolean Expressions: Example #3
A B C A+B' A'+C A+B'+C' F(A,B,C)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
27
Logic Circuits
A Boolean expression is realized using a network of
logic gates, known as a logic circuit or a circuit
diagram, where
Each logic gate represents a logical operator
Each input to a logic gate represents a literal
A
B
literals logical operators
F
Circuit Diagram
28
(Combinational) Logic Circuits
Composed of an interconnected set of logic gates.
Also known as Switching Circuits
Logic circuits can be designed from
Truth tables
Boolean expressions
Logic circuits are realized through
Interconnection of discrete components
Synthesis from a Hardware Description Language
29
Logic Circuit: Example #1
Given the following truth table,
A B F(A,B)
0 0 1
0 1 0
1 0 1
1 1 1
30
Logic Circuit: Example #2
Given the following truth table,
Truth table
Boolean Algebra
32
Equivalence: Example
33
Equivalence: Example
34
Simplifying Boolean Expressions
Combine terms
Eliminate redundant or consensus terms
Eliminate redundant literals
Add redundant terms to be combined with or
allow the elimination of other terms
35
Importance of Boolean Algebra
Boolean algebra is used to simplify Boolean
expressions.
36
Problem with Boolean Algebra
In general, there is no easy way to determine when a
Boolean expression has been simplified to a minimum
37
Circuit Design: Example
38
Standard Forms of Boolean Expressions
39
Standard Forms
40
Sum of Products (SOP)
Product Term
Logical product = AND operation
A product term is the ANDing of literals
Examples: A.B, A'.B.C, A.C', B.C'.D', A.B.C.D
“Sum of”
Logical sum = OR operation
The sum of products is the ORing of product terms.
41
The distributive laws are used to multiply out a
general Boolean expression to obtain the sum of
form.
A SOP expression is realized using a set of AND
gates (one for each product term) driving a single
42
Product of Sums (POS)
Sum Term
Logical sum = OR operation
A sum term is the ORing of literals
Examples: A+B, A'+B+C, A+C', B+C'+D'
“Product of”
Logical product = AND operation
The product of sums is the ANDing of sum terms.
43
The distributive laws are used to factor a general
Boolean expression to obtain the product of sums
(POS) form.
The distributive laws are also used to convert a
Boolean expression in SOP form to one in POS
form.
A POS expression is realized using a set of OR gates
(one for each sum term) driving a single AND gate
44
SOP and POS: Examples
For each of the following Boolean expressions, identify
whether it is in SOP or POS form:
1. F(A,B,C) = (A+B).(A'+B'+C').(B+C')
2. F(A,B,C) = A.B.C + B'.C' + A.C' + A'.B.C'
3. F(A,B,C) = A + B.C + B'.C' + A'.B'.C
4. F(A,B,C) = (A'+B'+C).(B+C').(A+C').(B')
5. F(A,B,C) = A.B.C + A'.(B+C) + (A+C').B
6. F(A,B,C) = A + B + C
45
Minterms and Maxterms
46
Minterm
In general, a minterm of n variables is a product
(ANDing) of n literals in which each variable appears
47
Minterms
48
Minterm Expansion
When a function f is written as a sum (ORing) of
minterms, it is referred to as a minterm expansion or a
49
Minterm Expansion
The minterm expansion for a general function of 3
variables can be written as follows:
3 variables
Denotes the logical
sum operation
ai = 0 or 1.
50
Maxterm
In general, a maxterm of n variables is a sum (ORing) of
n literals in which each variable appears exactly once in
51
Maxterms
52
Maxterm Expansion
When a function f is written as a product (ANDing) of
maxterms, it is referred to as a maxterm expansion or a
53
Maxterm Expansion
The maxterm expansion for a general function of 3
variables can be written as follows:
3 variables
Denotes the logical
product operation
ai = 0 or 1.
54
Minterm and Maxterm Expansions
55
Minterm and Maxterm Expansions
56
Logic Circuits
A function f can be represented by either a minterm
expansion or a maxterm expansion.
57
Incompletely Specified Functions
A function f is completely specified when its output
is defined (i.e. either 0 or 1) for all combinations of
its inputs.
However, if the output of a function f is not defined
for all combinations of its inputs, then it is said to
be incompletely specified.
Those combinations of the inputs for which the
output of function f is not defined are referred to
as “don't care” outputs.
58
Incompletely Specified Functions
The truth table representing an incompletely specified
function includes an “x” (or a “d”) in each row
59
Incompletely Specified Functions
A B C F
The minterm expansion is:
0 0 0 0
0 0 1 X
F(A,B,C) = m(2,4,7) + d(1,3,6)
0 1 0 1
“don't care” minterms
0 1 1 X
1 0 0 1 The maxterm expansion is:
F(A,B,C) = M(0,5) . D(1,3,6)
1 0 1 0
1 1 0 X
1 1 1 1
“don't care” maxterms
60
Incompletely Specified Functions
Assume X1 = 0, X2 = 0, X3 = 0:
A B C F
F(A,B,C) = A'BC' + AB'C' + ABC
0 0 0 0
0 0 1 X1
0 1 0 1 Assume X1 = 1, X2 = 1, X3 = 1:
0 1 1 X2
1 0 0 1 F(A,B,C) = B + AC' + A'C
1 0 1 0
Assume X1 = 0, X2 = 1, X3 = 1:
1 1 0 X3
1 1 1 1
F(A,B,C) = B + AC'
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77