1、Introduction:Boolean algebra is a mathematical system that defines a series of logical operations (AND, OR, NOT) performed on sets of variables (a, b, c,. ).When stated in this form , the expression is called a Boolean equation or switching equation.,CHAPTER 2: Boolean Switching Algebra(布尔开关代数),布尔代数
2、是一种数学系统。它在一组变量(a,b,c.)上定义了一系列逻辑操作(AND、OR、NOT)。用上述格式描述的表达式。称为布尔方程或开关方程,Operator Symbols: “()”, “ * ”, “ ”,no space S=xy s=x*y s=(x) (y) Two input and truth tableDistinctive shape symbols for AND gate,Three Primitive Logic Function -AND,P38 2-1b 2-1c式有错,真值表是用完全归纳的方式给出的表,它反映输入输出的逻辑关系。,Three Primitive L
3、ogic Function -OR,Operator Symbols: “+”s=x + y Two input and truth tableDistinctive shape symbols for OR gate,S,Three Primitive Logic Function -NOT,Operator Symbols: “ ”,“ ”x=x ,x=x truth tableDistinctive shape of the NOT symbols,x,Derived logic functions -NAND 、NOR、EX-OR、EX-NOR,NAND (not and):s=(x
4、y) ; s=x y,P39 2-5b式有错,Derived logic functions -NAND 、NOR、EX-OR、EX-NOR,NOR (not or):s=(x+ y) ;s=x + y,P40 2-6b式有错,Derived logic functions -NAND 、NOR、EX-OR、EX-NOR,EX-OR (exclusive or):s= x y,S=XY+XY,异或函数当有奇数个输入变量为真时,输出为真。 3输入?4输入?任意输入?,Derived logic functions -NAND 、NOR、EX-OR、EX-NOR,EX-NOR (exclusive
5、 not or):s= x y ; s=x y,S=XY+XY,异或非:是对异或的求反 当所有的输入变量都为相同时,输出为真。 奇数个输入变量为真时,输出? 偶数个输入变量为真时,输出?,IEEE Logic Symbols,IEEE general logic symbols:,前面给出的不同形状的逻辑符号是逻辑函数的传统表示方式,美国国家标准协会(ANSI)和美国电气与电子工程协会(IEEE)制定了逻辑函数符号标准。 所有逻辑符号都有一个长方形外框,在长方形外框的信息指明函数的种类,在长方形的左边是输入变量,右边是输出变量。,IEEE Logic Symbols,X,X,&,X,+,X,Z
6、=XY,Z=X+Y,1,IEEE Logic Symbols,&,+,Z=XY,Z=X+Y,=1,=1,Z=X Y,Z=X Y,The Basic Definition of A Binary Switching Algebra,2.2 开关代数 像其他正规代数系统一样,开关代数有一组规则来约束开关方程,这些规则有些比较直观,而有些比较难理解。Set (集合是指在某些方面有相似特性的项的总合) A set of elements is a collection of items that have something in common. e.g. D=0,1,2,3,4,5,6,7,8,9,
7、 3D denote that element 3 is a member of D PD means that P is not a member of set D,The Basic Definition of A Binary Switching Algebra,Equivalence If two variables x and y , have the same value they are said to be equivalent. e.g. X=0Y=0X=1Y=1,X=Y,X=Y,The Basic Definition of A Binary Switching Algeb
8、ra,Closure(封闭) A set is closed with respect to a binary operator( , +)if, when the operation is applied to members of the set, the result is a member of the set. The property of closure would not hold if an operation could produce a result not in the initial set. (封闭的概念是指集合对二进制运算( , +)是封闭的,在操作数是集合成员
9、时,结果也是集合的成员。如果操作数产生的结果不在原来的集合中,则称没有封闭的性质。) Let B=0,1,Truth table illustrating closure for AND,Truth table illustrating closure for OR,The Basic Definition of A Binary Switching Algebra,Identity(单位) A binary operator( , +)has an identity element we will call Ie. Ie must be contained in the binary num
10、ber set 0,1. When Ie is ANDed with a variable x the result is x; When Ie is ORed with a variable x the result is x.x Ie =x x +Ie =x,AND identity,OR identity,2.2 Switching Algebra Properties,1、Commutative(交换) Properties :X+Y=Y+X XY=YX 2、Associative(结合) Properties:(X+Y)+Z=X+(Y+Z)(XY) Z=X(YZ) 3、Distrib
11、utive(分配) Properties:X+(YZ)=(X+Y) (X+Z) (与通常代数表达式不同)X(Y+Z)=XY+XZ 4、Identity (0-1律) Properties:X+0=X X1=XX+1=1 X0=0 5、Complement (互补) Properties:X+X=1 XX=0,2.2 Switching Algebra-Theorems,Binary Variables and Constants:0+0=0 1+0=10+1=1 1+1=100=0 10=001=0 11=1 2、Idempotency Property (等幂律): X+X=X XX=X 3
12、、Absorption Property(吸收律):X+XY=X X(X+Y)=X(简化开关代数的有效工具) X+XY=X+Y X(X+Y)=XY 4、DeMorgan Properties(反演,狄*摩根): X+Y=X YXY=X+Y 5、Adjacency Properties: XY+XY=X (X+Y) (X+Y)=X,Idempotence Property: X+X=X XX=X (等幂律)Proof: X+X=(X+X) 1=(X+X) (X+X) =X+(XX) 分配律=X+0=X,2.2 Switching Algebra-Theorems,Absorption Prope
13、rty: X+XY=X X(X+Y)=X 吸收律 X+X Y=X+Y X(X+Y)=XYProof: X+XY=X1+XY=X(1+Y)=X(Y+1)=X1=XX+X Y=(X+X) (X+Y) (分配律)=1(X+Y)=X+Y,2.2 Switching Algebra-Theorems,DeMorgan Properties: X+Y=X YXY=X+YProof: (X Y)+(X+Y)=(X Y+X)+Y(结合)=(Y+X)+Y(分配)=X+(Y+Y) (结合)=X+1=1 (X Y) (X+Y)=X Y X+XY Y=0+0=0 X+Y=XY (Complement Properti
14、es),2.2 Switching Algebra-Theorems,DeMorgan Properties:,2.2 Switching Algebra-Theorems,x1x2x3xn=x1+x2+x3+xn x1+x2+x3+xn=x1.x2.x3xn,Adjacency Properties: XY+XY=X (X+Y) (X+Y)=XProof: XY+XY=X(Y+Y)=X1=X,2.2 Switching Algebra-Theorems,e.g. 1 Use DeMogans Theorem to find an equivalent to G=xy+xz. Solution
15、 1. Start with the complete function:a. Let A=xy and B=xzb. Then G=A+Bc. Complementing step b, G=(AB) 2.Having converted the OR to AND, we can now proceed to convert terms xy and xza. Converting, xy=(x+y)b. converting, xz=(x+z)c. Therefore,G=(x+y)(x+z),e.g. 2 Find the DeMogan equivalent to equation
16、F=x (y+ z). Solution1. By treating (y+z) as a unit the conversion yieldsF=x+ (y+ z)=(x+y+z)2. By applying DeMorgans theorm once more, a single three-input AND gate equivalent can also be foundF=(x+y+z)=xyz,P50 2-30 2-31 式有错 P51,2.3 Functionally Complete Operation Sets(功能完全操作集),Functionally Complete
17、Operation Sets is a set of logic functions from which any combinational(组合) logic expression can be realized. (功能完全操作集是一组逻辑函数集,它能实现所有的组合逻辑表达式。) FC1=AND,OR,NOT FC2=NOR FC3=NAND FC4=EXOR,AND,xy=xy, x+y = xy, x=xx xy=x+y, x+y = x+y, x=x+0 x=1x, x+y=xyxy P52 图2-29 2-30,2.4 Reduction Of Switching Equatio
18、ns Using Boolean Algebra,Why reduction?to reduce cost of the circuit “And-Or” expression (sum of products) “Or-And” expression (product of sums)eg: F(A,B,C)=A+BC+ABCF(A,B,C,D)=(A+B)(C+D)(A+B+C),2.4 Reduction Of Switching Equations Using Boolean Algebra,“And-Or” expression (sum of products) E.g. F=AC
19、+ABC+ACD+CDSolution: F=AC(1+B)+CD(1+A)=AC+CD,2.4 Reduction Of Switching Equations Using Boolean Algebra,“And-Or” expression Exe. 1、 F=AC(B+BD)+ACD2、 F=(AB)AB+AB+AB3、F=(A+B+C)(A+B+C),ANS: 1、 ABC+AD2、A+B3、AC+AB+BC,2.4 Reduction Of Switching Equations Using Boolean Algebra,Exe. 1、 F=AC(B+BD)+ACD,ANS: 1
20、、 ABC+AD,F=AC(B+BD)+ACD (分配律)=AC(B+D)+ACD=ACB+ACD+ACD=ACB+A D(C+C),2.4 Reduction Of Switching Equations Using Boolean Algebra,2、 F=(AB)AB+AB+AB,ANS: 2、A+B,F=(AB+AB)( (AB) (AB) )+AB =(AB+AB)( (A+B) (A+B) )+AB=(AB+AB)( AB+AB )+AB=AB+AB +AB=AB+A,2.4 Reduction Of Switching Equations Using Boolean Algebr
21、a,3、F=(A+B+C)(A+B+C),ANS: 3、AC+AB+BC,F=AB+AC+BA+BC+CA+CB=AB+BC+AC+AB+AC+BC =AB+BC+AC+AB(C+C)+AC(B+B)+BC(A+A) =AB+BC+AC+ABC+ABC +AC B+ AC B+ABC+A BC =AB+BC+AC+AC(B+B)+BC(A+A)+AB(C+C),2.4 Reduction Of Switching Equations Using Boolean Algebra,“Or-And” expression (product of sums) E.g. S=A(B+C)(BC)Solu
22、tion: S=A(BC)(B+C) DEMO =(ABC)(B+C) Distribution= ABBC+ABCC =ABC complement, idempotence,P72,2.4 Reduction Of Switching Equations Using Boolean Algebra,“Or-And” expression (product of sums) Exe. 1、 F=(A+B)(A+B)(B+C)(B+C+D)2、 F=(A+B)(A+B)(B+C)(A+C),P72,ANS: 1、A(B+C)2、(A+B)(A+B)C,F=(A+B)(A+B)(B+C)(B+C
23、+D) (分配律、吸收律)= (A+BB)(B+C)=A(B+C) F=(A+B)(A+B)(B+C)(A+C) (分配律)=(AB+AB)(AB+C)=(AB+AB)AB+(AB+AB)C (分配律)=(AB+A)(AB+B)C (分配律)=(A+A)(A+B)(B+A)(B+B)C,2.5 Realization of Switching Functions,There are three ways to describe the switching functions(开关函数有三种表达方式) Switching equations Truth table Logic diagram H
24、ow to solve a combinational logic function? Problem statement Construct truth table Logic expression Draw the diagram using logic symbols,2.5.1 Conversion of Switching Functions to Logic Diagram,为了解决问题,实现组合逻辑设计,必须首先求出开关方程。此后须将等式转化成逻辑图。同时,线路图是为了方便物理布局和线路板的设计。在逻辑设计、测试和投入生产后,须形成逻辑图、部件列表和线路布局等资料,测试工程师、生
25、产制造工程师和技术人员以后维护人员必须不断修正资料,2.5.1 Conversion of Switching Functions to Logic Diagram,E.g. Draw the logic diagram forT=ab+abex. 2-10、 ex. 2-11、 ex.2-12 Share common terms when multiple output equations (P56 P75, ex. 2.13 ; ex. 2.14 ),P57 K1、K2、K3 表达式有错,2.5.2 Converting Logic Diagram to Switching Equati
26、ons (逻辑图转化为开关方程),To Analyze logic diagrams to determine their purpose when troubleshooting or modifying logic designs. 当需要解决目前逻辑中的错误或修改已有的逻辑设计时,就要分析逻辑函数。对逻辑系统查错,而能得到的唯一资料常常只有逻辑图,没有开关方程和真值表。但只凭逻辑图很难判别电路的功能。只有了解电路的设计目的后,才能判断做得是否正确。,2.5.2 Converting Logic Diagram to Switching Equations (逻辑图转化为开关方程),P58
27、(P78), Ex.2.15 考虑图2-42的逻辑图,写出开关方程,化简并构造出真值表F=(XY) (X+Z) P58(P78), Ex.2.16 根据图2-43给出的逻辑图写出输出等式并构造真值表,小结,本章介绍了开关代数 逻辑函数可表示为: 开关变量 开关函数,包括表达式、真值表和逻辑图 开关函数的特性: 集合和元素 算术和逻辑操作符 开关函数的特性 等价性 封闭性 0-1律 结合律 分配律,小结,开关函数的特性 交换律 互补律 对偶律 吸收律 等幂律 提出功能完全操作集概念,功能完全是指该集合中的函数可表示出所有开关表达式。 与、或、非 与非 或非 利用布尔代数的基本公式和定理化简开关方程 开关方程转换为逻辑图 逻辑图转化为布尔表达式,Homework,Page 63(83): 24, 26, 29 (27书后答案有错),TO BE CONTINUED,