Professional Documents
Culture Documents
Boolean Algebra and Digital Logic
Boolean Algebra and Digital Logic
Boolean Algebra and Digital Logic
BOOLEAN ALGEBRA
AND DIGITAL LOGIC
CHAPTER 3 OBJECTIVES
2
3.1 INTRODUCTION
3
3.2 BOOLEAN ALGEBRA
• The relationship between Boolean logic and the actual physical
components of any computer system is very strong.
• The digital circuitry in digital computers and other digital systems is
designed, and its behavior is analyzed, with the use of a
mathematical discipline known as Boolean algebra.
7
3.2 BOOLEAN ALGEBRA
9
3.2 BOOLEAN ALGEBRA
• The truth table for the Boolean
function:
10
3.2 BOOLEAN ALGEBRA
11
3.2 BOOLEAN ALGEBRA
13
3.2 BOOLEAN ALGEBRA
1. Identity Law (2):
Rule 1: x . 1 = x A variable ANDed with 1 is always equal to the
variable itself.
14
3.2 BOOLEAN ALGEBRA
2. Null Law (2):
Rule 3: x . 0 = 0 A variable ANDed with 0 is always
equal to 0.
15
3.2 BOOLEAN ALGEBRA
3. Idempotent law (2):
Rule 5: x . x = x A variable ANDed with itself is always
equal to the variable.
16
3.2 BOOLEAN ALGEBRA
4. Inverse Law (2):
Rule 7: x . x’ = 0 A variable ANDed with its
complement is always equal to 0.
17
3.2 BOOLEAN ALGEBRA
18
3.2 BOOLEAN ALGEBRA
5. Commutative Law (2):
Rule 9: AB = BA This law states that the order in which
the variables are ANDed makes no difference.
19
3.2 BOOLEAN ALGEBRA
6. Associative Law (2):
Rule 11: A(BC) = (AB)C This law states that it makes no
difference in what order the variables are grouped when
ANDing more than two variables.
20
3.2 BOOLEAN ALGEBRA
7. Distributive Law (2):
Rule 13: A(B + C) = AB + AC This law states that ORing
two or more variables and then ANDing the result with a
single variable is equivalent to ANDing the single
variable with each of the two or more variables and then
ORing the products.
21
3.2 BOOLEAN ALGEBRA
• Our last group of Boolean identities are perhaps the
most useful.
Note that each relationship (with the exception of the last one) has both an
AND (or product) form and an OR (or sum) form. This is known as the 22
duality principle.
3.2 BOOLEAN ALGEBRA
8. Absorption Law (2)
Rule 14: A(A + B) = A
Rule 15: A + AB = A
9. DeMorgan’s Law (2)
Rule 16: AB’ = A’ + B’ The complement of two or
more ANDed variables is equivalent to the OR of
the complements of the individual variables.
23
3.2 BOOLEAN ALGEBRA
9. DeMorgan’s Law (2)
Rule 17: (A + B)’ = A’B’ The complement of two or
more ORed variables is equivalent to the AND of
the complements of the individual variables.
24
if so solve this
25
3.2 BOOLEAN ALGEBRA
26
3.2
• BOOLEAN
DeMorgan’s law can
ALGEBRA
be extended to any number of variables.
• Replace each variable by its complement and change all
ANDs to ORs and all ORs to ANDs.
1.
27
•3.2 BOOLEAN
Replace each variable by itsALGEBRA
complement and change all ANDs to ORs and all
ORs to ANDs.
Activity
28
3.2 BOOLEAN ALGEBRA
29
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
• A logic expression can be reduced to its simplest form
or changed to a more convenient form to implement
the expression most efficiently using Boolean algebra.
• A simplified Boolean expression uses the fewest gates
possible to implement a given expression.
• Simpler circuits are cheaper to build, consume less
power, and run faster than complex circuits.
30
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
Using Boolean algebra techniques, simplify this expression:
AB + A(B + C) + B(B + C)
Solution
1. Apply the distributive law AB + AB + AC + BB + BC
2. Apply the Idempotent law AB + AB + AC + B + BC
3. Apply the Idempotent law AB + AC + B + BC
4. Apply the Absorption law AB + AC + B
5. Apply the Absorption law AB + B + AC
B + AC
31
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
The simplification process has significantly reduced the number
of logic gates required to implement the expression
Five gates are required to implement the expression in its original
form (a); however, only two gates are needed for the simplified
expression (b).
32
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
33
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
• Through our exercises in simplifying Boolean expressions, we see
that there are numerous ways of stating the same Boolean expression.
• Simpler circuits are cheaper to build, consume less power, and
run faster than complex circuits.
.
• Logically equivalent expressions have identical truth tables.
• In order to eliminate as much confusion as possible, designers
express Boolean functions in standardized or canonical form.
34
3.2 STANDARD FORMS OF BOOLEAN
EXPRESSIONS
• All Boolean expressions, regardless of their form, can be
converted into either of two standard forms: the sum-of-
products form or the product-of-sums form.
35
3.2 STANDARD FORMS OF BOOLEAN
EXPRESSIONS
• There are two canonical forms for Boolean expressions:
sum-of-products and product-of-sums.
• In the sum-of-products form, ANDed variables are ORed
together.
• For example:
1..
2..
3..
4..
37
3.2 BOOLEAN ALGEBRA
• It is easy to convert a function to
sum-of-products form using its
truth table.
• We are interested in the values of
the variables that make the
function true (=1).
• Using the truth table, we list the
values of the variables that result
in a true function value.
• Each group of variables is then 38
ORed together.
3.2 BOOLEAN ALGEBRA
• In an SOP expression, a single overbar cannot extend
over more than one variable; however, more than one
variable in a term can have an overbar.
40
3.2 BOOLEAN ALGEBRA
41
3.2 BOOLEAN ALGEBRA
The Product-of-Sums (POS) Form
42
3.2 BOOLEAN ALGEBRA
The Product-of-Sums (POS) Form
43
3.2 BOOLEAN ALGEBRA
Converting Standard SOP to Standard POS
•The binary values of the product terms in a given standard
SOP expression are not present in the equivalent standard POS
expression.
•Also, the binary values that are not represented in the SOP
expression are present in the equivalent POS expression.
44
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
• All standard Boolean expressions can be easily converted into
truth table format using binary values for each term in the
expression.
• The truth table is a common way of presenting, in a concise
format, the logical operation of a circuit.
• Also, standard SOP or POS expressions can be determined
from a truth table
45
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
Converting SOP Expressions to Truth Table Format
•A truth table is simply a list of the possible combinations of
input variable values and the corresponding output values (1 or
0).
• For an expression with a domain of two variables, there are
four different combinations of those variables (22 = 4).
•For an expression with a domain of three variables, there are
eight different combinations of those variables (23 = 8) and so on.
46
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
Converting SOP Expressions to Truth Table Format
• The first step in constructing a truth table is to list all possible
combinations of binary values of the variables in the expression.
• Next, convert the SOP expression to standard form if it is not
already.
• Finally, place a 1 in the output column (X) for each binary
value that makes the standard SOP expression a 1 and place a 0
for all the remaining binary values.
47
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
.
There are three variables in the domain, so there are eight
possible combinations of binary values of the variables.
48
KARNAUGH MAPS (k-map)
49
KARNAUGH MAPS (k-map)
• The output values placed in each cell are derived from the
minterms of a Boolean function.
52
3A.2 DESCRIPTION OF KMAPS AND
TERMINOLOGY
Of course, the minterm function that we derived from our Kmap was not in simplest 54
terms.
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• A Kmap for three variables is constructed as shown in
the diagram below.
• We have placed each minterm in the cell that will hold
its value.
• Notice that the values for the yz combination at the
top of the matrix form a pattern that is not a normal
binary sequence.
55
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• Thus, the first row of the Kmap contains all minterms
where x has a value of zero and the first column contains
all minterms where y and z both have a value of zero.
56
3A.4 STANDARD SOP EXPRESSION
• For SOP expression in standard form, a 1 is placed on
the K-map for each product term in the expression.
• Each 1 is placed in a cell corresponding to the value of a
product term.
• For example, for the product term , a 1 goes in the 101
cell on a 3-variable map
58
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• We can, however, reduce our complicated expression to its
simplest terms by finding adjacent 1s in the Kmap that can be
collected into groups that are powers of two.
Consider the function:
Activity
1.Is the function is SOP or POS
2.Simplify the function using
Boolean algebra rules
3.Find its truth table and K-map 59
A. .
B. .
C. .
60
3A.4 STANDARD SOP EXPRESSION
Mapping process Activity
A. B.
61
3A.4 NON-STANDARD SOP EXPRESSION
• A Boolean expression must first be in standard form before
you use a K-map.
• If an expression is not in standard form, then it must be
converted to standard form.
• Assume that one of the product terms in a 3-variable
expression is B.
• Write the binary value of the variable; then attach all
possible values for the missing variables A and C as
follows:
62
3A.4 NON-STANDARD SOP EXPRESSION
• Map the following SOP expression on a K-map:
Kmap.
Grouping the 1s
•Group the 1s in each of the K-maps based on the rule:
65
3A.4 DETERMINING THE MINIMUM SOP
EXPRESSION FROM THE MAP
The following rules are applied to find the minimum
product terms and the minimum SOP expression.
1.Each group of cells containing 1s creates one product term
composed of all variables that occur in only one form (either
uncomplemented or complemented) within the group
2.Variables that occur both uncomplemented and complemented
within the group are eliminated. These are called contradictory
variables.
3.Determine the minimum product term for each group
4.When all the minimum product terms are derived from the K-
map, they are summed to form the minimum SOP expression. 66
Determine the product terms for each of the K-maps
67
3A.4 K-MAP POS MINIMIZATION
• The approaches are much the same except that with POS
expressions, 0s representing the standard sum terms are
placed on the K-map instead of 1s.
68
3A.4 K-MAP POS MINIMIZATION
Map the following standard POS expression on a K- map:
69
3A.4 K-MAP POS MINIMIZATION
Use a K-map to minimize the following standard POS
expression and also, derive the equivalent SOP expression.
70
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• This grouping tells us that changes in the variables x and y have
no influence upon the value of the function: They are irrelevant.
• This means that the function,
reduces to F(x) = z.
72
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• In this Kmap, we see an example of a group that wraps
around the sides of a Kmap.
• This group tells us that the values of x and y are not relevant
to the term of the function that is encompassed by the group.
• What does this tell us about this term of the function?
75
3A.5 KMAP SIMPLIFICATION
FOR FOUR VARIABLES
• We have populated the Kmap shown below with the nonzero minterms from the
function:
Recall that
groups can
overlap.
76
3A.5 KMAP SIMPLIFICATION
FOR FOUR VARIABLES
• Our three groups consist of:
• A purple group entirely within the Kmap at the right.
• A pink group that wraps the top and bottom.
• A green group that spans the corners.
• Thus we have three terms in our final function:
77
3.3 LOGIC GATES
78
3.3 LOGIC GATES
• Each gate is defined in three ways: graphic symbol,
algebraic notation, and truth table.
• The three simplest gates are the AND, OR, and NOT gates.
2.
80
3.3 ACTIVITY ON LOGIC GATES
Design a logic circuit to implement the operation specified
in the truth table.
1..
81
3.3 ACTIVITY ON LOGIC GATES
Design a logic circuit to implement the operation specified
in the truth table.
2..
82
Develop a logic circuit with four input variables that will only produce a 1 output when exactly three
3.3 LOGIC GATES
84
3.3 LOGIC GATES
• Gates can have multiple inputs and more than one output.
• A second output can be provided for the complement
of the operation.
• We’ll see more of this later.
86
3.4 DIGITAL COMPONENTS
• logic diagram represents the physical implementation of the given expression,
or the actual digital circuit.
• The main thing to remember is that combinations of gates implement Boolean
functions.
• The circuit below implements the Boolean function:
87
We simplify our Boolean expressions so
that we can create simpler circuits.
3.5 COMBINATIONAL CIRCUITS
88
3.5 COMBINATIONAL CIRCUITS
Characteristics
Output depends only upon present input.
The combinational circuit do not use any memory.
The previous state of input does not have any effect on the
present state of the circuit.
A combinational circuit can have an n number of inputs and
m number of outputs.
Easy to design, high speed, and is time independent. 89
3.5 COMBINATIONAL CIRCUITS
• The half-adder accepts two binary digits on its inputs and produces two binary
digits on its outputs—a sum bit and a carry bit. 91
3.5 COMBINATIONAL CIRCUITS
92
3.5 COMBINATIONAL CIRCUITS
93
3.5 COMBINATIONAL CIRCUITS
This is a block
diagram for a 95
decoder.
3.5 COMBINATIONAL CIRCUITS
If x = 0 and y = 1,
which output line
is enabled? 96
3.5 COMBINATIONAL CIRCUITS
97
3.5 COMBINATIONAL CIRCUITS
98
3.6 SEQUENTIAL CIRCUITS
Characteristics
In this output depends upon present as well as past input.
There exists a feedback path between input and output.
Elementary building blocks: Flip-flops, Mainly used for storing data.
Sequential circuits have capability to store any state or to retain
earlier state.
As sequential circuits are clock dependent they need triggering.
Speed is slow, and its designed tough as compared to combinational
99
circuits.
3.6 SEQUENTIAL CIRCUITS
100
3.6 SEQUENTIAL CIRCUITS
101
3.6 SEQUENTIAL CIRCUITS
Asynchronous sequential circuit
•Is a sequential circuit whose behavior depends upon the
sequence in which the input signals.
•The output will be affected whenever the input changes.
•There is no need to wait for a clock pulse.
•Asynchronous circuits are faster than synchronous sequential
circuits. However, in an asynchronous circuit, events are
allowed to occur without any synchronization. And in such a
case, the system becomes unstable.
103
3.6 SEQUENTIAL CIRCUITS
104
3.6 SEQUENTIAL CIRCUITS
• To retain their state values, sequential circuits rely on
feedback.
• Feedback in digital circuits occurs when an output is looped
back to the input.
• A simple example of this concept is shown below.
• If Q is 0 it will always be 0, if it is 1, it will always be 1.
Why?
105
3.6 SEQUENTIAL CIRCUITS
Flip-flops
•The memory elements used in sequential circuits are flip-
flops which are capable of storing binary information.
•The basic 1-bit digital memory circuit is known as a flip-
flop. It can have only two states, either the 1 state or the 0
state.
•Flip-flops can be obtained by using NAND or NOR gates.
106
3.6 SEQUENTIAL CIRCUITS
107
3.6 SEQUENTIAL CIRCUITS
108
3.6 SEQUENTIAL CIRCUITS
• The behavior of an SR flip-flop is described by a characteristic table.
• Q(t) means the value of the output at time t. Q(t+1) is the value of Q
after the next clock pulse.
• We can describe any flip-flop by using a characteristic table, which
indicates what the next state should be based on the inputs and the
current state
109
3.6 SEQUENTIAL CIRCUITS`
111
3.6 SEQUENTIAL CIRCUITS
112
3.6 SEQUENTIAL CIRCUITS
113
3.6 SEQUENTIAL CIRCUITS
114
3.7 DESIGNING CIRCUITS
115
3.7 DESIGNING CIRCUITS
117
3.7 DESIGNING CIRCUITS
• However, there are also cases in which a software implementation is better. It
is often desirable to replace a large number of digital components with a
single programmed microcomputer chip, resulting in an embedded system,
which are small special-purpose computers that we find in many everyday
things.
• embedded system is a microcontroller or microprocessor based system which
is designed to perform a specific task.
• Embedded systems require special programming that demands an
understanding of the operation of digital circuits, the basics of which you
have learned in this chapter.
118
CHAPTER 3 CONCLUSION