Download presentation
Presentation is loading. Please wait.
1
Lecture 3: Boolean Algebra
3-1 Boolean Operations and Expressions 3-2 Laws and Rules of Boolean algebra 3-3 DeMorgan’s Theorems 3-4 Boolean Analysis of Logic Circuits 3-5 Simplification Using Boolean Algebra
2
Lecture 3: Boolean Algebra
Boolean algebra is the mathematics of digital systems. 1854, George Boole- An Investigation of the Laws of Thought, on Which Are Founded the Mathematical Theories of Logic and Probabilities Logic Algebra, known as Boolean Algebra today, is formulated. Boolean Algebra is a convenient and systematic way of expressing and analyzing the operation of logic circuits. This lecture covers the laws, rules, and theorems of Boolean algebra and their application to digital circuits. How to define a given circuit with a Boolean expression and then evaluate its operation? How to simplify logic circuits using the methods of Boolean algebra?
3
逻辑代数又称布尔代数。它是分析和设计现代数字逻辑电路不可缺少的数学工具。逻辑代数有一系列的定律、定理和规则,用于对数学表达式进行处理,以完成对逻辑电路的化简、变换、分析和设计。
逻辑关系指的是事件产生的条件和结果之间的因果关系。在数字电路中往往是将事情的条件作为输入信号,而结果用输出信号表示。条件和结果的两种对立状态分别用逻辑“1” 和“0”表示。
4
逻辑代数的基本定律和恒等式 基本公式 0、1律: A · 0 = 0 A + 1 = 1 自等律: A · 1 = A A + 0 = A A · A = 0 A + A = 1 互补律: 交换律: A + B = B + A A · B = B · A 结合律: A + B + C = (A + B) + C A · B · C = (A · B) · C 分配律: A + BC = ( A + B )( A + C ) A ( B + C ) = AB + AC
5
重叠律: A + A = A A · A = A 反演律: AB = A + B A + B = A · B 还原律: 吸收律 AB+ AC+BC=AB + AC 其它常用恒等式 AB+ AC+BCD=AB + AC
6
3-1 Boolean Operations and Expressions
1 Concepts Variable: a symbol used to represent an action, a condition, or data. A single variable can only have a value of 1 or 0. Complement: the inverse of a variable and is indicated with an overbar. Thus, the complement of A is A. Literal: a variable or its complement. 2 Boolean Addition Addition is equivalent to the OR operation. The sum term is 1 if one or more if the literals are 1. The sum term is 0 only if each literal is 0.
7
3-1 Boolean Operations and Expressions
3 Boolean Multiplication In Boolean algebra, multiplication is equivalent to the AND operation. The product of literals forms a product term. The product term will be 1 only if all of the literals are 1. What are the values of the A, B and C if the product term of A.B.C = 1? Example Solution Each literal must = 1; therefore A = 1, B = 0 and C = 0.
8
3-2 Laws and Rules of Boolean algebra
1 Laws of Boolean Algebra Commutative Laws applied to addition and multiplication. For addition, in terms of the result, the order in which variables are ORed makes no difference. A + B = B + A For multiplication, in terms of the result, the order in which variables are ANDed makes no difference. AB = BA
9
3-2 Laws and Rules of Boolean algebra
1 Laws of Boolean Algebra Associative Laws applied to addition and multiplication. For addition, when ORing more than two variables, the result is the same regardless of the grouping of the variables. A + (B +C) = (A + B) + C For multiplication, when ANDing more than two variables, the result is the same regardless of the grouping of the variables. A(BC) = (AB)C
10
3-2 Laws and Rules of Boolean algebra
1 Laws of Boolean Algebra Distributive Law A(B+ C)= AB + AC The distributive law is the factoring law. A common variable can be factored from an expression just as in ordinary algebra. That is AB + AC = A(B+ C)
11
3-2 Laws and Rules of Boolean algebra
1 Laws of Boolean Algebra Commutative Laws A + B = B + A AB = BA Associative Laws A + (B +C) = (A + B) + C A(BC) = (AB)C Distributive Law A(B+ C)= AB + AC AB + AC = A(B+ C) Identify the law of Boolean algebra upon which each of the following equalities is based:
12
3-2 Laws and Rules of Boolean algebra
A + A = A A . A = A A + 0 = A A . 1 = A A + 1 = 1 A . 0 = 0 AB = A + B A+B = A B A = A = A + A = 1 A . A = 0 A + AB = A A + B = B + A AB = BA A + AB = A + B A + (B +C) = (A + B) + C A(BC) = (AB)C (A + B)(A + C) = A + BC A(B+ C)= AB + AC AB + AC = A(B+ C) A, B, and C can represent a single variable or a combination of variables. P Read the statements of Rules 1-9 within 5m.
13
3-2 Laws and Rules of Boolean algebra
A + 0 = A A + 1 = 1 A . 0 = 0 A . 1 = A
14
3-2 Laws and Rules of Boolean algebra
A + A = A A + A = 1 A . A = A A A = 0 A = A =
15
3-2 Laws and Rules of Boolean algebra
A + AB = A·1+ AB Factoring = A(1+ B) B+1=B A + AB = A A·1=A = A·1 A·1=A = A A + AB = A + B A + AB = A +AB+ AB Factoring = A + (A+ A)B A + A = 1 = A + B (A + B)(A + C) = A + BC Distributive Law (A + B)(A + C) = AA + AC + AB + BC = A + AC + AB + BC = A(1 + C + B) + BC = A BC = A + BC A·A=A Factoring A+1=A A·1=A
16
3-2 Laws and Rules of Boolean algebra
P225 Problem 8 Identify the law of Boolean rule(s) upon which each of the following equalities is based. ASSIGNMENT Reading- Chapter 4 P Analyzing-Example 4-1, 4-2, Rules 11 and 12 (P178, 179) Homework-Problems 2, 3, 4(e) and (f), 6(d) (P224)
17
3-3 DeMorgan’s Theorems 1 DeMorgan’s 1st Theorem AB = A + B
The complement of a product of variables is equal to the sum of the complements of the variables. AB = A + B The complement of two or more ANDed variables is equivalent to the OR of the complements of the individual variables.
18
3-3 DeMorgan’s Theorems 2 DeMorgan’s 2nd Theorem A+B = A B
The complement of a sum of variables is equal to the product of the complements of variables. A+B = A B The complement of two or more ORed variables is equivalent to the AND of the complements of the individual variables.
19
3-3 DeMorgan’s Theorems 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. To apply Demorgan’s theorem, break the bar over the product of variables and change the sign from AND to OR.
20
3-3 DeMorgan’s Theorems 3 Application of DeMorgan’s Theorems
AB = A + B A+B = A B Demorgan’s Theorems can also apply to expressions in which there are more than two variables. Example 4-4 Apply DeMorgan’s theorems to the following expressions. Each Variable in Demorgan’s Theorems can also represent a combination of other variables. P225 Problem 10 A(B+ C)= AB + AC
21
3-3 DeMorgan’s Theorems 3 Application of DeMorgan’s Theorems
P225 Problem 10 Apply DeMorgan’s theorems to the following expressions. AB = A + B A = A = AB + AC = A(B+ C) A + 1 = 1 Example 4-5 Apply DeMorgan’s theorems to the following expressions.
22
3-3 DeMorgan’s Theorems 3 Application of DeMorgan’s Theorems
Example 4-7 The XOR Gate The XNOR Gate X = AB + AB= A + B. X = AB + AB= A ⊙ B. With the Boolean expression for XOR gate, use Demorgan’s theorems and any other rules or laws that are applicable to develop an expression for the XNOR gate.. A+B = A B AB = A + B A = A = A(B+ C)= AB + AC A A = 0 AB = BA
23
3-3 DeMorgan’s Theorems AB = A + B A+B = A B
The complement of a product of variables is equal to the sum of the complements of the variables. AB = A + B The complement of a sum of variables is equal to the product of the complements of variables. A+B = A B After completing this section, you should be able to State DeMorgan’s theorems. Apply DeMorgan’s theorems to the simplification of Boolean expression. ASSIGNMENT Reading-Page Analyzing-Example 4-3, 4-4, 4-5, 4-6 (P182, 183) Homework-Problems 9(a), (c), (e) and (g), 10(b) (P225)
24
3-4 Boolean Analysis of Logic Circuits
1 Determine the Boolean expression for a Given 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. Example Write the Boolean expression for the following logic circuit.
25
3-4 Boolean Analysis of Logic Circuits
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. P225 Problem 12 P225 Problem 13
26
3-4 Boolean Analysis of Logic Circuits
2 Draw the Logic Circuit Represented by a Boolean Expression To get the logic circuit for a given Boolean expression, use a NOT gate to implement the inverse of a variable, an AND gate to implement a product term, and an OR gate to implement a sum term. P225 Problem 14 P225 Problem 13
27
Analyzing-Fig 4-16, Tab 4-5(183)
ASSIGNMENT Reading- Chapter 4 P Analyzing-Fig 4-16, Tab 4-5(183) Homework-Problems 13 (a) and (b), 14 (d), 15 (b) (P225)
28
逻辑代数的基本规则 代入规则 : 在包含变量A逻辑等式中,如果用另一个函数式代入式中所有A的位置,则等式仍然成立。这一规则称为代入规则。
例:B (A + C) = BA+BC, 用A + D代替A,得 B [(A +D) +C ] = B(A +D) + BC = BA + BD + BC 代入规则可以扩展所有基本公式或定律的应用范围
29
2. 反演规则: 对于任意一个逻辑表达式L,若将其中所有的与(• )换成或(+),或(+)换成与(•);原变量换为反变量,反变量换为原变量;将1换成0,0换成1;则得到的结果就是原函数的反函数。 例2.1.1 试求 的非函数 等效电路由三个基本元件构成 解:按照反演规则,得
30
3. 对偶规则: 对于任何逻辑函数式,若将其中的与(• )换成或(+),或(+)换成与(•);并将1换成0,0换成1;那么,所得的新的函数式就是L的对偶式,记作 。 例: 逻辑函数 的对偶式为 当某个逻辑恒等式成立时,则该恒等式两侧的对偶式也相等。 这就是对偶规则。利用对偶规则,可从已知公式中得到更多的 运算公式,例如,吸收律
31
3-5 Simplification Using Boolean Algebra
Many times, you have to reduce a particular expression to its simplest form or change its form to a more convenient one to implement the expression most efficiently. To use the basic laws, rules, and theorems of Boolean algebra to manipulate and simplify an expression. Simplification means fewer gates for the same function.
32
3-5 Simplification Using Boolean Algebra
To use the basic laws, rules, and theorems of Boolean algebra to manipulate and simplify an expression. Example 4-10 Simplify the Boolean expression A(B+ C)= AB + AC A A = 0 AB + AC = A(B+ C) A . A = A AB + AC = A(B+ C) A + A = 1 A . 1 = 1
33
3-5 Simplification Using Boolean Algebra
Example Simplify the following Boolean expressions. . Example 4-11 A + AB = A + B Example 4-10 (A + B)(A + C) = A + BC
34
3-5 Simplification Using Boolean Algebra
ASSIGNMENT Reading- Chapter 4 P Analyzing-Example 4-9, 4-10, 4-11 and 4-12 (86-188) Homework-Problems 19(e), 20(b) and 21(a) (P226)
35
Lecture 3: Boolean Algebra
Boolean addition is equivalent to the OR operation. Boolean multiplication is equivalent to the AND operation. A + B = B + A AB = BA Commutative Laws Associative Laws Distributive Law Rules of Boolean Algebra Demorgan’s Theorems A + (B +C) = (A + B) + C A(BC) = (AB)C AB + AC = A(B+ C) 1. A + 0 = A 2. A + 1 = 1 3. A . 0 = 0 4. A . 1 = 1 5. A + A = A 7. A . A = A 6. A + A = 1 8. A . A = 0 9. A = A = 10. A +AB=A 12. (A + B)(A + C) = A + BC 11. A + AB = A + B AB = A + B A+B = A B
36
Quiz 1. The associative law for addition is normally written as
a. A + B = B + A b. (A + B) + C = A + (B + C) c. AB = BA d. A + AB = A 2. The Boolean equation AB + AC = A(B+ C) illustrates a. the distribution law b. the commutative law c. the associative law d. DeMorgan’s theorem 3. The Boolean expression A . 1 is equal to a. A b. B c. 0 d. 1 © 2008 Pearson Education
37
Quiz 4. The Boolean expression A + 1 is equal to a. A b. B c. 0 d. 1
5. The Boolean equation AB + AC = A(B+ C) illustrates a. the distribution law b. the commutative law c. the associative law d. DeMorgan’s theorem 6. A Boolean expression that is in standard SOP form is a. the minimum logic expression b. contains only one product term c. has every variable in the domain in every term d. none of the above © 2008 Pearson Education © 2008 Pearson Education
38
Quiz 7. The component of a variable is always a. 0 b. 1
c. equal to the variable d. the inverse of the variable 8. The Boolean expression is a. a sum term b. a literal term c. a product term d. a complemented term 9. The Boolean expression is a. A sum term b. A product term c. A literal term d. Aways 1 © 2008 Pearson Education
39
Quiz 10. According the commutative law of addition, a. AB=BA b. A=A+A
c. A+(B+C)=(A+B)+C d. A+B=B+A 11. According to the associative law of multiplication, a. B=BB b. A(BC)=(AB)C c. A+B=B+A d. B+B(B+0) 12. According to the distributive law, a. A(B+C)=AB+AC b. A(BC)=ABC c. A(A+1)=A d. A+AB=A © 2008 Pearson Education
40
Quiz 13. Which one of the following is not a valid rule of Boolean algebra? a. A+1=A b. A=A c. AA=A d. A+0=A 14. Which of the following rules states that if one of input of an AND gate is always 1, the output is equal to the other input? a. A+1=A b. A+A=A c. A·A=A d. A·1=A 15. The following equality(s) is (are) correct: © 2008 Pearson Education
41
Quiz 16. The Boolean expression X=AB+CD represents
a. two ORs ANDed together b. a 4-input AND gate c. two ANDs ORed together d. an exclusive-OR
42
Homework Problems 9(a), (c), (e) and (g); 10(b)
13 (a) and (b); 14 (d); 15 (b) 19(e); 20(b) and 21(a)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.