1 2. boolean algebra and logic gates. 2 boolean algebra and logic gates basic definitions (...

30
1 2. Boolean Algebra and Logic Gates

Upload: brett-banks

Post on 18-Jan-2016

238 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

1

2. Boolean Algebra and Logic Gates

Page 2: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

2

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)

Page 3: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

3

Boolean Algebra and Logic Gates

예 ) 실수 (+) : 덧셈

Identity element : 0 Inverse : -a

(.) : 곱셈 Identity : 1 Inverse : 1/a

Distributive law A . (B+C) = A . B + A . C

Page 4: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

4

Boolean Algebra and Logic Gates

Boolean Algebra 논리의 체계적인 조작 : 즉 각 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 존재

Page 5: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

5

Boolean Algebra 의 예 { 참 , 참중간 , 중간 , 거짓중간 , 거짓 } 의 경우에 다음의 빈칸을 채우시오

AND 참 참중간 중간 거짓중간 거짓

참중간

중간

거짓중간

거짓

AND 1 0.75 0.5 0.25 0

1

0.75

0.5

0.25

0

OR 참 참중간 중간 거짓중간 거짓

참중간

중간

거짓중간

거짓

OR 1 0.75 0.5 0.25 0

1

0.75

0.5

0.25

0

0.5.(0.75+0.25) = 0.5.0.75+0.5.0.25 의 분배법칙이 맞는지 ? 0.25+(1.0) = (0.25+1) .(0.25+0) 의 분배법칙이 맞는지 ?

Page 6: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

6

Boolean Algebra and Logic Gates

Boolean Algebra 와 일반 대수와 의 차이점 X+(y.z)=(x+y) .(x+z) 는 일반 대수에서는

성립하지 않음 Boolean algebra 에서는 역원이 없슴 일반 대수는 원소가 무한이 많은 실수를 다

룸 . 하지만 boolean algebra 에서는 논리적인 원소들을 다름 현재는 two-value의 원소를 다룸 )

Page 7: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

7

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 10 1 0 0 1 1 1 01 0 0 1 0 11 1 1 1 1 1

Page 8: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

8

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

Page 9: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

9

Basic Theorems and Properties of Boolean Algebra

증명 순서 postulate

postulate

postulate

postulate

Theorem

Theorem

Page 10: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

10

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+xy0 0 0 00 1 0 01 0 0 11 1 1 1

Theorem 6(b) 증명방법 : duality x+xy = x x(x+y) = x

Page 11: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

11

Boolean Functions Table 2-1 익힐 것

일반적인 function 의 예 F(x,y) = x+xy

Page 12: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

12

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

Page 13: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

13

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 – Algebraic Manipulation

Page 14: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

14

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 을 com

plement 시킨 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'

Boolean Functions – Complement of a Function

Page 15: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

15

Canonical and Standard Forms Minterms(standard product) and Maxterms(standard sum)

(m3)’= M3 의 관계 주목할 것

Page 16: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

16

Canonical and Standard Forms Minterms(standard product) and Maxterms(standard sum) m3 = x’yz, M3 = x+y’+z’ m1 = M1 = m6 = M6 = m7 = M7 =

Page 17: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

17

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

Page 18: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

18

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

Canonical and Standard Forms

m1 m4 m7f

x y z index x'y'z xy'z' xyz

0 0 0 0

0 0 1 1

0 1 0 2

0 1 1 3

1 0 0 4

1 0 1 5

1 1 0 6

1 1 1 7

Page 19: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

19

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

Canonical and Standard Forms

M0 M2 M3 M5 M6

fx y z inde

x(x+y+z) (x+y'+z) (x+y'+z') (x'+y+z') (x'+y'+z)

0 0 0 0

0 0 1 1

0 1 0 2

0 1 1 3

1 0 0 4

1 0 1 5

1 1 0 6

1 1 1 7

Page 20: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

20

Sum of Minterms Ex 2-4) Express the Boolean function F=A+B'C in a sum of minterm

s. 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

Page 21: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

21

Product of maxterms Ex 2-5) Express the Boolean function F = xy + x'z in a product of m

axterm 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

Page 22: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

22

Conversion between Canonical FormsF(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

Page 23: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

23

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

Canonical and Standard Forms

Page 24: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

24

Other Logic Operations

Page 25: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

25

Digital Logic Gate

Page 26: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

26

Digital Logic Gate

Page 27: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

27

Extension to Multiple Inputs – 교환 , 결합법칙이 성립하는 경우 다중입력으로 쉽게 확장 (AND, OR 의 경우 )

AND 의 경우 : (xy)z=x(yz)=3 input 의 xyz gate

Digital Logic Gate

xyz

xyz

xyz

OR 의 경우도 성립 : (x+y)+z = x+(y+z) = 3 input 의 OR gate

Page 28: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

28

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

Digital Logic Gate

F = [(ABC)'(DE)']' = ABC + DE

Page 29: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

29

- exclusive-OR ( 교환 , 결합법칙 성립 )

Positive and Negative Logic

Digital Logic Gate

Page 30: 1 2. Boolean Algebra and Logic Gates. 2 Boolean Algebra and Logic Gates  Basic Definitions ( 일반적인 대수 체계의 경우 ) 1. Closure : A set S is closed with respect

30

Positive and Negative Logic

Digital Logic Gate

H H

H L

L H

L L

H

L

L

L

H=1, L=0 일때 , AND gate

H=0, L=1 일때 , OR gate