Boolean Algebra
Boolean Algebra
1
Introduction
• Formulated by George Boole in 1854 in An Investigation of the Laws of Thought, on
Which Are Founded the Mathematical Theories of Logic and Probabilities.
• Applied to the analysis and design of logic circuits by Claude Shannon in 1938.
• Boolean algebra is a convenient and systematic way of expressing and analyzing the
operation of logic circuits.
• This chapter covers the laws, rules, and theorems of Boolean algebra and their
application to digital circuits.
• You will learn how to define a given circuit with a Boolean expression and then evaluate
its operation and how to simplify logic circuits using the methods of Boolean algebra and
Karnaugh maps.
2
Boolean operations: Addition
3
Boolean operations: Addition
4
Boolean operations: Multiplication
ത 𝐷
• Determine the values of A, B ,C and D that make the sum term 𝐴𝐵𝐶 ഥ=1
5
Boolean operations: Multiplication
ത 𝐷
• Determine the values of A, B ,C and D that make the sum term 𝐴𝐵𝐶 ഥ=1
• 𝐴 = 1; 𝐵 = 0; 𝐶 = 1 𝑎𝑛𝑑 𝐷 = 0
• 𝑠𝑜 1 ∙ 0ത ∙ 1 ∙ 0ത = 1 ∙ 1 ∙ 1 ∙ 1 =1
6
Laws of Boolean algebra
7
Laws of Boolean algebra
8
Laws of Boolean algebra
9
Laws of Boolean algebra
10
Rules of Boolean algebra
11
Rules of Boolean algebra
• Rule 1: 𝐴 + 0 = 𝐴
• Rule 2: 𝐴 + 1 = 1
12
Rules of Boolean algebra
• Rule 3: 𝐴 ∙ 0 = 0
• Rule 4: 𝐴 ∙ 1 = 𝐴
13
Rules of Boolean algebra
• Rule 5: 𝐴 + 𝐴 = 𝐴
• Rule 6: 𝐴 + 𝐴ҧ = 1
14
Rules of Boolean algebra
• Rule 7: 𝐴 ∙ 𝐴 = 𝐴
• Rule 8: 𝐴 ∙ 𝐴ҧ = 0
15
Rules of Boolean algebra
• Rule 9: 𝐴Ӗ = 𝐴
𝐴 + 𝐴𝐵 = 𝐴 ∙ 1 + 𝐴𝐵 = 𝐴 1 + 𝐵 = 𝐴 1 = 𝐴
16
Rules of Boolean algebra
ҧ =𝐴+𝐵
• Rule 11: 𝐴 + 𝐴𝐵
ҧ = 𝐴 + 𝐴𝐵 + 𝐴𝐵
• 𝐴 + 𝐴𝐵 ҧ 𝑅𝑢𝑙𝑒 10: 𝐴 = 𝐴 + 𝐴𝐵
ҧ
• = 𝐴𝐴 + 𝐴𝐵 + 𝐴𝐵 𝑅𝑢𝑙𝑒 7: 𝐴 = 𝐴𝐴
ҧ + 𝐴𝐴
• = 𝐴𝐴 + 𝐴𝐵 + 𝐴𝐵 ҧ 𝑅𝑢𝑙𝑒 8 𝐴𝐴ҧ = 0
• = (𝐴 + 𝐴)ҧ 𝐴 + 𝐵 𝐹𝑎𝑐𝑡𝑜𝑟𝑖𝑛𝑔
• =1 𝐴+𝐵 𝑅𝑢𝑙𝑒 6 𝐴 + 𝐴ҧ = 1
• =𝐴+𝐵
17
Rules of Boolean algebra
• Rule 12: 𝐴 + 𝐵 𝐴 + 𝐶 = 𝐴 + 𝐵𝐶
18
DeMorgan’s Theorem
• DeMorgan’s theorems provide mathematical verification of the equivalency of the NAND
and negative-OR gates and the equivalency of the NOR and negative-AND gates.
• First theorem: The complement of a product of variables is equal to the sum of the
complements of the variables.
19
DeMorgan’s Theorem
• Second theorem: The complement of a sum of variables is equal to the product of the
complements of the variables.
20
Applying DeMorgan’s Theorem
Exercise 1. Apply DeMorgan’s theorems and Boolean algebra laws and rules to the following
expression:
𝐴 + 𝐵𝐶ҧ + 𝐷 𝐸 + 𝐹ത
21
Applying DeMorgan’s Theorem
Exercise 2. Apply DeMorgan’s theorems and Boolean algebra laws and rules to the following
expression:
𝐴+𝐵+𝐶 𝐷
22
Applying DeMorgan’s Theorem
Exercise 3. Apply DeMorgan’s theorems and Boolean algebra laws and rules to the following
expression:
𝐴 + 𝐵 𝐶ҧ 𝐷
ഥ + 𝐸 + 𝐹ത
23
Boolean expression for a logic circuit
To derive the Boolean expression for a given combinational logic circuit, begin at the left-most
inputs and work toward the final output, writing the expression for each gate
24
Constructing a Truth Table for a Logic Circuit
?
The expression A(B + CD) = 1 when
25
Constructing a Truth Table for a Logic Circuit
26
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 the basic laws, rules, and theorems of
Boolean algebra to manipulate and simplify the expression.
A simplified Boolean expression uses the fewest gates possible to implement a given
Expression.
27
Logic simplification using Boolean algebra
Exercise 4. Simplify the following Boolean expressions:
28
Logic simplification using Boolean algebra
Exercise 4. Simplify the following Boolean expressions:
29
Logic simplification using Boolean algebra
Exercise 5. Simplify the following Boolean expressions:
30
Logic simplification using Boolean algebra
Exercise 6. Simplify the following Boolean expressions:
31
Standard form of Boolean expressions
Sum of products (SOP) form
A standard SOP expression is one in which all the variables in the domain appear in
each product term in the expression. For example,
33
Standard form of Boolean expressions
Product of sums (POS) form
34
Standard form of Boolean expressions
Standard product of sums (POS) form
A standard POS expression is one in which all the variables in the domain appear in
each sum term in the expression. For example,
35
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
• You will find truth tables in data sheets and other literature related to the operation of
digital circuits.
36
Boolean expressions and truth tables
• Converting a SOP expression to Truth Table Format
• An SOP expression is equal to 1 only if at least one of the product terms is equal to 1.
• A truth table is simply a list of the possible combinations of input variable values and the
corresponding output values (1 or 0).
• The number of possible combinations for a n number of variables is equal to 2𝑛
• If there are four variables, 16 possible combinations exist.
37
Boolean expressions and truth tables
• Exercise 7. Develop a truth table for the standard SOP expression
38
Boolean expressions and truth tables
• Exercise 7. Develop a truth table for the standard SOP expression
39
Boolean expressions and truth tables
• Converting a POS expression to Truth Table Format
• An POS expression is equal to 0 only if at least one of the sum terms is equal to 0.
• Exercise 8. Develop a truth table for the standard POS expression
40
Boolean expressions and truth tables
• Converting a POS expression to Truth Table Format
• An POS expression is equal to 0 only if at least one of the sum terms is equal to 0.
• Exercise 8. Develop a truth table for the standard POS expression
41
Boolean expressions and truth tables
• Determining standard expressions from a truth table: SOP
• List the binary values of the input variables for which the output is 1. Convert each binary
value to the corresponding product term by replacing each 1 with the corresponding
variable and each 0 with the corresponding variable complement.
42
Boolean expressions and truth tables
• Determining standard expressions from a truth table: POS
• List the binary values of the input variables for which the output is 0. Convert each binary
value to the corresponding sum term by replacing each 1 with the corresponding variable
complement and each 0 with the corresponding variable.
43
Boolean expressions and truth tables
• Exercise 9. From the truth table, determine the standard SOP expression and the
equivalent standard POS expression.
44
Boolean expressions and truth tables
• Exercise 9. From the truth table, determine the standard SOP expression and the
equivalent standard POS expression.
45
The Karnaugh map
• Provides a systematic method for simplifying Boolean expressions and, if properly used,
will produce the simplest SOP or POS expression possible, known as the minimum
expression.
• Provides a cookbook method for simplification.
• The Karnaugh map is an array of cells in which each cell represents a binary value of the
input variables.
• Simplification of a given expression is simply a matter of properly grouping the cells.
• The number of cells in a Karnaugh map is equal to the total number of possible input
variable combinations. For three variables, the number of cells is 23 = 8.
46
The 3-variable Karnaugh map
47
The 4-variable Karnaugh map
48
The Karnaugh map cell adjacency
• The cells are arranged so that there is only a
single-variable change between adjacent
cells.
50
Mapping a standard SOP expression
51
Mapping a standard SOP expression
• Exercise 10. Map the following standard SOP expression on a Karnaugh map
52
Mapping a standard SOP expression
• Exercise 10. Map the following standard SOP expression on a Karnaugh map
53
Mapping a nonstandard SOP expression
• Exercise 11. Map the following nonstandard SOP expression on a Karnaugh map
• A Boolean expression must first be in standard form before you use a Karnaugh map.
• For conversion, we use the numerical expansion method for a Non-standard product term:
54
Mapping a nonstandard SOP expression
• Exercise 12. Map the following nonstandard SOP expression on a Karnaugh map
55
Karnaugh Map Simplification of SOP Expressions
The process that results in an expression containing the fewest possible terms with the
fewest possible variables is called minimization. After an SOP expression has been
mapped, a minimum SOP expression is obtained by grouping the 1s and determining the
minimum SOP expression from the map.
56
Karnaugh Map Simplification of SOP Expressions
57
Karnaugh Map Simplification of SOP Expressions
58
Karnaugh Map Simplification of SOP Expressions
Determine the product terms for each of the Karnaugh maps and write the resulting minimum SOP
expression
59
Karnaugh Map Simplification of SOP Expressions
• Exercise 13. Use a Karnaugh map to minimize the following SOP expression:
60
Karnaugh Map Simplification of SOP Expressions
• Exercise 12b. Minimize the SOP expression of exercise 12
61
Mapping from a truth table
Minimization
𝐵ത 𝐶ҧ + 𝐴𝐵
62
“Don’t Care” Conditions
• A situation arises in which some input variable combinations are not allowed, like the
conditions 1010, 1011, 1100, 1101, 1110, and 1111 for BCD coding.
63
“Don’t Care” Conditions
• Exercise 14. In a 7-segment display, each of
the seven segments is activated for various
digits. For example, segment a is activated
for the digits 0, 2, 3, 5, 6, 7, 8, and 9,
65
Karnaugh Map Simplification of POS Expressions
• Exercise 16. Como ingeniero desarrollador de hardware, usted está encargado de
desarrollar un circuito lógico que permita controlar un motor usando tres pulsadores A, B y
C, considerando las siguientes condiciones:
• a) Si se pulsan los tres pulsadores el motor se activa.
• b) Si se pulsan dos pulsadores cualesquiera, el motor se activa, pero se enciende una
lámpara adicional como señal de emergencia.
• c) Si sólo se pulsa un pulsador, el motor no se activa, pero se enciende la lámpara
indicadora de emergencia.
• d) Si no se pulsa ningún pulsador, ni el motor ni la lámpara se activan.
Diseñe un circuito lógico que cumpla las condiciones de funcionamiento del enunciado usando
el mínimo número de compuertas lógicas 66