2. Boolean Algebra and Logic Gates
Boolean Algebra and Logic Gates Basic Definitions (일반적인 대수 체계의 경우) 1. Closure : A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique elements of S. 2. Associative law : (x*y)*z=x*(y*z) for all x,y,z∈S 3. Commutative law : x*y=y*x for all x,y∈S 4. Identity elements: for all x∈S, e*x=x*e=x ex) set of integers I={…, -3, -2, -1, 0, 1, 2, 3, …}, x+0=0+x=x 5. Inverse : A set S having the identity elements for all x∈S , y∈S, x*y=e 6. Distributive law : x*(y . z)=(x*y) . (x*z)
Boolean Algebra and Logic Gates 예) 실수 (+) : 덧셈 Identity element : 0 Inverse : -a (.) : 곱셈 Identity : 1 Inverse : 1/a Distributive law A . (B+C) = A . B + A . C
Boolean Algebra and Logic Gates 논리의 체계적인 조작 : 즉 각 element가 논리적인 값들임. (크기가 있는 것이 아님) 일단 논리의 종류(element의 개수 (ex:참,중간,거짓등))가 여러 개를 가정함 연산자 2개를 정의 (+), (.) Closure Identity element (x+0=0+x=x, x.1=1.x=x Commutative law (x+y=y+x, x.y=y.x) Distributive law (x. (y+z)=(x.y)+(x.z), x+(y.z)=(x+y) .(x+z)) 보수 (complement) (x+x’=1, x.x’=0의 x’ 존재) 2개이상의 다른 종류의 element 존재
Boolean Algebra의 예 0.5.(0.75+0.25) = 0.5.0.75+0.5.0.25 의 분배법칙이 맞는지? {참, 참중간, 중간, 거짓중간, 거짓}의 경우에 다음의 빈칸을 채우시오 AND 참 참중간 중간 거짓중간 거짓 OR 참 참중간 중간 거짓중간 거짓 AND 1 0.75 0.5 0.25 OR 1 0.75 0.5 0.25 0.5.(0.75+0.25) = 0.5.0.75+0.5.0.25 의 분배법칙이 맞는지? 0.25+(1.0) = (0.25+1) .(0.25+0) 의 분배법칙이 맞는지?
Boolean Algebra and Logic Gates X+(y.z)=(x+y) .(x+z)는 일반 대수에서는 성립하지 않음 Boolean algebra에서는 역원이 없슴 일반 대수는 원소가 무한이 많은 실수를 다룸. 하지만 boolean algebra에서는 논리적인 원소들을 다름 현재는 two-value의 원소를 다룸)
Boolean Algebra and Logic Gates Two-Value algebra : B={0,1} Not 연산자의 등장 : element가 두 개밖에 없으므로 가능 x y x.y x y x+y x x’ 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1
Basic Theorems and Properties of Boolean Algebra Duality-책의 증명내용참고(postulate로부터 theorem증명과정임) - interchange OR and And operators and replace 1’s by 0’s and 0’s by 1’s 증명 방법 : 대수적인 방법(예:theorem 1a x+x=(x+x).1=(x+x)(x+x’)=x+xx’=x+0=x) 과 모든 가능한 조합으로부터의 진리표를 만들어 증명하는 방법 모두 가능 (예: theorem 6(a)- 다다음 슬라이드) Operator precedence 1. Parentheses 2. NOT 3. AND 4. OR
Basic Theorems and Properties of Boolean Algebra 증명 순서 postulate postulate postulate postulate Theorem Theorem
Basic Theorems and Properties of Boolean Algebra Theorem 2(a) 증명 x+1 = 1.(x+1) = (x+x’)(x+1) = x+x’.1 =x+x’ =1 Theorem 6(a) 증명해볼 것 : x+xy = x Theorem 6(a)의 진리표에 의한 증명 x y xy x+xy 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 Theorem 6(b) 증명방법 : duality x+xy = x x(x+y) = x
Boolean Functions Table 2-1 익힐 것 일반적인 function 의 예 F(x,y) = x+xy
Boolean Functions F1 = x + y'z F2 = x'y'z + x'yz +xy' = x'z(y'+y) + xy' = x'z + xy'(최소 gate이용) F3 = xy + y'z를 gate implementation 및 truth table 작성 하시오.
Boolean Functions – Algebraic Manipulation Ex 2-1) Simplify the following Boolean functions to a minimum number of literals. 1. x(x'+y) = xx' + xy = 0 + xy = xy. 2. x +x'y = (x+x')(x+y) = 1(x+y) = x + y. 3. (x+y)(x+y') = x + xy + xy' + yy' = x(1+y+y') = x. (다른 방법으로 해볼 것) 4. xy + x'z + yz = xy + x'z + yz(x+x') = xy + x'z + xyz + x'yz = xy(1+z) + x'z(1+y) = xy + x'z 5. (x+y)(x'+z)(y+z) = (x+y)(x'+z) : by duality from function 4. (A + B + C)'= (A+x)' let B+C=x = A'x' by theorem 5(a)(DeMorgan) = A'(B+C)' substitute B+C=x = A'(B'C') by theorem 5(a)(DeMorgan) = A'B'C' by theorem 4(b)(associative) => (A+B+C+D+…+F)' = A'B'C'D'…F' (ABCD…F)' = A' +B'+ C' + D' + … + F'
Boolean Functions – Complement of a Function Ex 2-2) Find the complement of the functions F1=x'yz'+x'y'z, F2=x(y'z'+yz). F1' = (x'yz'+x'y'z)' = (x'yz')'(x'y'z)' = (x+y'+z)(x+y+z') F2' = [x(y'z'+yz)]' = x'+(y'z'+yz)' = x'+(y'z')'(yz)' = x'+(y+z)(y'+z') Ex 2-3) Find the complement of the functions F1 And F2 Ex 2-2 by taking their duals and complementing each literal. DeMorgna’s rule에 의하면 (A+B)’는 A+B의 dual인 AB의 각 literal 을 complement 시킨 A’B’ 와 같음 1. F1 = x'yz' + x'y'z. The dual of F1 is (x'+y+z')(x'+y'+z) Complement each literal : (x+y'+z)(x+y+z')=F1' 2. F2 = x(y'z'+yz). The dual of F2 is x+(y'+z')(y+z)이다. Complement each literal : x'+(y+z)(y'+z')=F2'
Canonical and Standard Forms Minterms(standard product) and Maxterms(standard sum) (m3)’= M3 의 관계 주목할 것
Canonical and Standard Forms Minterms(standard product) and Maxterms(standard sum) m3 = x’yz, M3 = x+y’+z’ m1 = M1 = m6 = M6 = m7 = M7 =
Canonical and Standard Forms f1 = x'y'z+xy'z'+xyz = m1+m4+m7 f2 = x'yz+xy'z+xyz'+xyz = m3+m5+m6+m7 f1 = (x+y+z)(x+y'+z)(x+y'+z' )(x'+y+z')(x'+y'+z) = M0M2M3M5M6 f2 = (x+y+z)(x+y+z‘)(x+y'+z)(x'+y+z) = M0M1M2M4
Canonical and Standard Forms f = x'y'z+ xy'z'+xyz = m1+m4+m7 =(x+y+z)(x+y'+z)(x+y'+z' )(x'+y+z')(x'+y'+z) = M0M2M3M5M6 m1 m4 m7 f x y z index x'y'z xy'z' xyz 1 2 3 4 5 6 7
Canonical and Standard Forms f = x'y'z+ xy'z'+xyz = m1+m4+m7 =(x+y+z)(x+y'+z)(x+y'+z' )(x'+y+z')(x'+y'+z) = M0M2M3M5M6 M0 M2 M3 M5 M6 f x y z index (x+y+z) (x+y'+z) (x+y'+z') (x'+y+z') (x'+y'+z) 1 2 3 4 5 6 7
Canonical and Standard Forms Sum of Minterms Ex 2-4) Express the Boolean function F=A+B'C in a sum of minterms. A = A(B+B') = AB +AB' = AB(C+C') + AB'(C+C') = ABC + ABC' + AB'C +AB'C' B'C = B'C(A+A') = AB'C + A'B'C F = A + B'C = A' B'C + AB'C' + AB'C + ABC' + ABC = m1 + m4 + m5 + m6 + m7 = ∑(1, 4, 5, 6, 7) F = xy + x'z 해볼 것 (진리표 방법 먼저 해보고, 이후 식 전개를 통하여 해볼 것)
Canonical and Standard Forms Product of maxterms Ex 2-5) Express the Boolean function F = xy + x'z in a product of maxterm form. F = xy + x'z = (xy+x')(xy+z) = (x+x')(y+x')(x+z)(y+z) = (x'+y)(x+z)(y+z) x' + y= x' + y + zz'= (x'+y+z)(x'+y+z') x + z= x + z + yy'= (x+y+z)(x+y'+z) y + z= y + z + xx'= (x+y+z)(x'+y+z) F = (x+y+z)(x+y'+z)(x'+y+z)(x'+y+z') = M0M2M4M5 F(x, y, z) = ∏(0, 2, 4, 5) F=A+B'C 해 볼 것
Canonical and Standard Forms Conversion between Canonical Forms F(A, B, C) = ∑(1, 4, 5, 6, 7) F' (A, B, C) = ∑(0, 2, 3) = m0 + m2 + m3 F = (m0+m2+m3)' = m0'm2'm3' = M0M2M3 = ∏(0, 2, 3) , mj' = Mj Ex) F = xy + x'z F(x, y, z) = ∑(1, 3, 6, 7) F(x, y, z) = ∏(0, 2, 4, 5)
Canonical and Standard Forms - Sum of product : F1 = y' +xy + x'yz' - Product of sum : F2 = x(y'+z)(x'+y+z') - Ex) F3 = AB + C(D+E) = AB +CD + CE
Other Logic Operations
Digital Logic Gate
Digital Logic Gate
Digital Logic Gate Extension to Multiple Inputs – 교환,결합법칙이 성립하는 경우 다중입력으로 쉽게 확장 (AND, OR 의 경우) AND 의 경우 : (xy)z=x(yz)=3 input 의 xyz gate x y x z y z x y z OR 의 경우도 성립 : (x+y)+z = x+(y+z) = 3 input 의 OR gate
F = [(ABC)'(DE)']' = ABC + DE Digital Logic Gate Extension to Multiple Inputs – 다른 연산은 체크해보아야 함 The NAND and NOR operators are not associative. (x↓y)↓z≠x↓(y↓z) NOR (x↓y)↓z= [(x+y)'+z]' = (x+y)z'= xz' + yz' x↓(y↓z)= [x+(y+z)'] ' = x'(y+z)= x'y + x'z x↓y↓z= (x+y+z)' x↑y↑z= (xyz)' NAND F = [(ABC)'(DE)']' = ABC + DE
Digital Logic Gate - exclusive-OR (교환, 결합법칙 성립) Positive and Negative Logic
Digital Logic Gate Positive and Negative Logic H=1, L=0 일때, AND gate H=0, L=1 일때, OR gate H H H H L L L H L L L L