0% found this document useful (0 votes)
6 views77 pages

EEB341.Chapter03-BooleanAlgebra

The document is a lecture on Boolean Algebra, covering its principles, operations, and applications in digital electronics. It explains the concepts of truth tables, Boolean expressions, logic circuits, and the importance of simplification in circuit design. Additionally, it introduces standard forms of Boolean expressions, such as Sum of Products (SOP) and Product of Sums (POS), along with minterms and maxterms.

Uploaded by

motswapongbakang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views77 pages

EEB341.Chapter03-BooleanAlgebra

The document is a lecture on Boolean Algebra, covering its principles, operations, and applications in digital electronics. It explains the concepts of truth tables, Boolean expressions, logic circuits, and the importance of simplification in circuit design. Additionally, it introduces standard forms of Boolean expressions, such as Sum of Products (SOP) and Product of Sums (POS), along with minterms and maxterms.

Uploaded by

motswapongbakang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Dr.

N Ditshego
Lecturer
Department of Electrical Engineering
University of Botswana

Office No: 248/213


Ext: 4229
Email: [email protected]

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

• Is not same as real-number 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

 A logic function can be described by a


 Truth table
 Boolean expression (i.e. equation)
 Circuit diagram (aka. Logic Circuit)
 Each can equally describe the logic function.

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.

Each row in the truth table corresponds to a unique


combination of the input variables.

 For n input variables, there are 2n rows.


Each row is assigned a numerical value, with the rows
listed in ascending order.

The order of the input variables defined in the logic


function is important.

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

Are F1 and F2 the same logic functions?

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')

Literals highlighted in green


Logical operators highlighted in blue

20
Boolean Expressions

 A Boolean expression is evaluated by


 Substituting a 0 or 1 for each literal
 Calculating the logical value of the expression
A truth table represents the evaluation of a
Boolean expression for all combinations of the

input variables.

21
Boolean Expressions: Example #1
Simple AND and OR Functions

Using a truth table, evaluate the following Boolean


expressions:
An AND function = 1

F1(A,B,C) = A'.B.C'
when all literals = 1.

F2(A,B,C) = A + B' + C'


An OR function = 1
Literal = X or X'
when any literal = 1.
If X' = 1 then X = 0
If X' = 0 then X = 1 An OR function = 0
when all literals = 0.

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

Using a truth table, evaluate the following Boolean


expression:

F(A,B,C) = A'.C + B.C' + A.B'.C'


An AND term = 1
An OR function = 1 when all literals = 1.
when any term = 1.

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

Using a truth table, evaluate the following Boolean


expression:

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,

1. Derive a Boolean expression


2. Draw the corresponding circuit diagram

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,

1. Derive a Boolean expression


2. Draw the corresponding circuit diagram
A B C F(A,B,C)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
31
Equivalency of Boolean Expressions
Two Boolean expressions are equivalent if they have
the same value for each combination of the variables

in the Boolean expression.


How do you prove that two Boolean expressions are
equivalent?

 Truth table
 Boolean Algebra

32
Equivalence: Example

Using a Truth table, prove that the following two


Boolean expressions are equivalent.

F1(A,B) = A'.B + A.B'


F2(A,B) = (A'.B' + A.B)'

33
Equivalence: Example

A B A'B AB' A'B' AB F1 F2


0 0
0 1
1 0
1 1

34
Simplifying Boolean Expressions

Boolean algebra can be used in several ways to


simplify a Boolean expression:

 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.

 Simpler expressions leads to simpler logic circuits.


 Reduces cost
 Reduces area requirements
 Reduces power consumption
The objective of the digital circuit designer is to design
and realize optimal digital circuits.

 Thus, Boolean algebra is an important tool to the


digital circuit designer.

36
Problem with Boolean Algebra
In general, there is no easy way to determine when a
Boolean expression has been simplified to a minimum

number of terms or a minimum number of literals.

Karnaugh Maps provide a better mechanism for the


simplification of Boolean expressions.

37
Circuit Design: Example

For the following Boolean expression:

F(A,B,C) = A.B.C + A'.B.C + A.B'.C + A.B.C'

1. Draw the circuit diagram


2. Simplify using Boolean algebra
3. Draw the simplified circuit diagram

38
Standard Forms of Boolean Expressions

39
Standard Forms

There are two standard forms in which all Boolean


expressions can be written:

1. Sum of Products (SOP)


2. Product of Sums (POS)

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

products (SOP) form.


The distributive laws are also used to convert a
Boolean expression in POS form to one in SOP

form.
A SOP expression is realized using a set of AND
gates (one for each product term) driving a single

OR gate (for the sum).

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

(for the product).

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

exactly once in either true or complemented form, but


not both.
 A literal is a variable or its complement.
For a given row in the truth table, the corresponding
minterm is formed by

 Including the true form a variable if its value is 1.


 Including the complemented form of a variable if its
value is 0.

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

standard sum of products.


 aka. “canonical sum of products”
 aka. “disjunctive normal form”
If f = 1 for row i of the truth table, then mi must be
present in the minterm expansion.

 The minterm expansion for a function f is unique.


 However, it is not necessarily the lowest cost.

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.

This can be extended to n variables

50
Maxterm
In general, a maxterm of n variables is a sum (ORing) of
n literals in which each variable appears exactly once in

either true or complemented form, but not both.


 A literal is a variable or its complement.
For a given row in the truth table, the corresponding
maxterm is formed by

 Including the true form a variable if its value is 0.


 Including the complemented form of a variable if its
value is 1.

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

standard product of sums.


 aka. “canonical product of sums”
 aka. “conjunctive normal form”
If f = 0 for row i of the truth table, then Mi must be
present in the maxterm expansion.

 The maxterm expansion for a function f is unique.


 However, it is not necessarily the lowest cost.

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.

This can be extended to n variables

54
Minterm and Maxterm Expansions

What is the relationship between the minterm


expansion and maxterm expansion for the same
function?

55
Minterm and Maxterm Expansions

What is the relationship between the minterm


expansion for a function and that for the
complement of the function?

What about the maxterm expansion?

56
Logic Circuits
A function f can be represented by either a minterm
expansion or a maxterm expansion.

Both forms of the function can be realized using logic


gates that implement the basic logic operations.

 Minterm Expansion (Standard SOP)


 Consists of the sum (OR) of product (AND) terms.
 Realized using an AND-OR circuit.
 Maxterm Expansion (Standard POS)
 Consists of the product (AND) of sum (OR) terms.
 Realized using an OR-AND circuit.

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

corresponding to an input combination for which the


output is not defined.
A B C F
0 0 0 0
0 0 1 X “don't care” for ABC = 001
0 1 0 1
0 1 1 X “don't care” for ABC = 011
1 0 0 1
1 0 1 0
1 1 0 X “don't care” for ABC = 110
1 1 1 1

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

 A “don't care” can be either a 0 or 1.


 Select a value for each “don't care” that will help
simplify the function.

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

You might also like