unit 2. boolean algebraocw.ulsan.ac.kr/ocwdata/2012/01/g01036-03/lecturenotes/[2... ·...

24
L i D i (2012) Logic Design (2012) Unit 2. Boolean Algebra Spring 2012 School of Computer Engineering & Information Technology Information Technology P fJ M Ki 1 마이크로프로세서 © 2010, Jong-Myon Kim http://eucs.ulsan.ac.kr Prof. Jong-Myon Kim

Upload: others

Post on 18-Jan-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

L i D i (2012)Logic Design (2012)

Unit 2. Boolean Algebra

Spring 2012

School of Computer Engineering & Information TechnologyInformation Technology

P f J M Ki

1 마이크로프로세서© 2010, Jong-Myon Kim http://eucs.ulsan.ac.kr

Prof. Jong-Myon Kim

Page 2: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Objectives

Topics introduced in this chapterTopics introduced in this chapter Understand the basic operations and laws of Boolean algebra Relate these operations and laws to AND, OR, NOT gates and switches Prove these laws using a truth table Manipulation of algebraic expression usingManipulation of algebraic expression using

Multiplying out Factoring Si lif i Simplifying Finding the complement of an expression

2 마이크로프로세서© 2010, Jong-Myon Kim 2 Logic Design© 2012, Jong-Myon Kim

Page 3: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Introduction

B i th ti f l i d i B l l b Basic mathematics for logic design: Boolean algebraRestrict to switching circuits (Two state values 0, 1) –

S it hi l bSwitching algebra Boolean Variable : X, Y, … can only have two state

l (0 1)values (0, 1) representing True(1) False (0)

3 마이크로프로세서© 2010, Jong-Myon Kim 3 Logic Design© 2012, Jong-Myon Kim

Page 4: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Operations

Not (Inverter)

01' and 1'0 1X if 0X' and 0X if 1X'

Gate Symbol

4 마이크로프로세서© 2010, Jong-Myon Kim 4 Logic Design© 2012, Jong-Myon Kim

Page 5: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Operations

AND

Truth Table

111 ,001 ,010 ,000

Truth Table

A B C = A · B

0 0 00 00 11 0

0001 0

1 101

Gate SymbolGate Symbol

5 마이크로프로세서© 2010, Jong-Myon Kim 5 Logic Design© 2012, Jong-Myon Kim

Page 6: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Operations

OR

111101110000

Truth Table

111 ,101 ,110 ,000

A B C = A · B

0 0 00 00 11 0

011

1 1 1

Gate SymbolGate Symbol

6 마이크로프로세서© 2010, Jong-Myon Kim 6 Logic Design© 2012, Jong-Myon Kim

Page 7: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Operations

Apply to Switch

AND T=A·B

OR T=A+BOR T=A+B

7 마이크로프로세서© 2010, Jong-Myon Kim 7 Logic Design© 2012, Jong-Myon Kim

Page 8: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Boolean Expressions and Truth Tables

Logic Expression :

)'( CAB

Circuit of Logic

8 마이크로프로세서© 2010, Jong-Myon Kim 8 Logic Design© 2012, Jong-Myon Kim

Page 9: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Boolean Expressions and Truth Tables

Logic Expression :

BEDCA )]'([

Circuit of Logic

0000)]'1(1[01)]'01(1[)]'([ BEDCA

Logic Evaluation : A=B=C=1, D=E=0

9 마이크로프로세서© 2010, Jong-Myon Kim 9 Logic Design© 2012, Jong-Myon Kim

0000)]'1(1[01)]'01(1[)]'([ BEDCA

Page 10: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Boolean Expressions and Truth Tables

2-Input Circuit and Truth Table

A B A’ F = A’ + B

0 0 1 10 00 11 0

110

110

1 1 0 1

10 마이크로프로세서© 2010, Jong-Myon Kim 10 Logic Design© 2012, Jong-Myon Kim

Page 11: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Boolean Expressions and Truth Tables

Proof using Truth Table))(( )')((' CBCACAB

n variable needs 2x2x2x = 2n rowsn variable needs 2x2x2x… = 2n rows

n times

A B C B’ AB’ AB’ + C A + C B’ + C (A + C) (B’ + C)

0 0 00 0 1

11

00

01

01

11

010 0 1

0 1 00 1 11 0 01 0 1

10011

00011

10111

10111

10111

101111 0 1

1 1 01 1 1

100

100

101

111

101

101

11 마이크로프로세서© 2010, Jong-Myon Kim 11 Logic Design© 2012, Jong-Myon Kim

Page 12: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Theorems

Operations with 0, 1

00111 0

XXXXXX

Idempotent(멱등) Laws 00 11

XXXXXXXX

Involution(누승) Laws

Complementary(상보) Laws 0' 1' )''(

XXXXXX

p y( )

101'11 ,1 if and ,10'00 ,0 XXProof

11)'( EDABExamples

11)( EDAB0)'')('( DABDAB

12 마이크로프로세서© 2010, Jong-Myon Kim 12 Logic Design© 2012, Jong-Myon Kim

Page 13: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Theorems with Switch Circuits

13 마이크로프로세서© 2010, Jong-Myon Kim 13 Logic Design© 2012, Jong-Myon Kim

Page 14: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Basic Theorems with Switch Circuits

14 마이크로프로세서© 2010, Jong-Myon Kim 14 Logic Design© 2012, Jong-Myon Kim

Page 15: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Commutative, Associative, Distributive

Commutative Laws : YX,XY XYYX

Associative Laws : ZYXZYXZYX

XYZYZXZXY

)()()()(

Proof of Associative Law for AND

ZYXZYXZYX )()(

X Y Z XY YZ (XY)Z X(YZ)

0 0 00 0 1

0 00 0

0 00 00 0 1

0 1 00 1 11 0 0

0 00 00 10 0

0 00 00 00 01 0 0

1 0 11 1 01 1 1

0 00 01 01 1

0 00 00 01 1

15 마이크로프로세서© 2010, Jong-Myon Kim 15 Logic Design© 2012, Jong-Myon Kim

1 1 1 1 1 1 1

Page 16: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Associative Laws for AND and OR

16 마이크로프로세서© 2010, Jong-Myon Kim 16 Logic Design© 2012, Jong-Myon Kim

Page 17: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Commutative, Associative, Distributive

AND : 1iff1 ZYXXYZOR :

Distribute Laws :

0 iff 0 ZYXZYX

XZXYZYX )( XZXYZYX )())(( ZXYXYZX

Valid only Boolean algebra not for ordinaryalgebra not for ordinary algebra

ProofYZYXXZXXZXYZXXZXYX )()())((

YZXYZXYZYZXYZXYXZXYZXYXZX

YZYXXZXXZXYZXXZXYX

1)1(1

)()())((

17 마이크로프로세서© 2010, Jong-Myon Kim 17 Logic Design© 2012, Jong-Myon Kim

YZXYZXYZYZX 1)1(

Page 18: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Simplification Theorems

Useful Theorems for Simplification

XYXXXXYXXYXYXXXYXY

)( )')(( '

YXYXYXYYYX ' )'(

Proof

XYXYYYXYXYY 1)()')(('XXYXXYXXYXX )(

XXYXXYXXYX 1)1(1

)())((

Proof with Switch

=

18 마이크로프로세서© 2010, Jong-Myon Kim 18 Logic Design© 2011, Jong-Myon Kim

Page 19: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Simplification Theorems

Equivalent Gate Circuits

ABBAAF )'(

=

19 마이크로프로세서© 2010, Jong-Myon Kim 19 Logic Design© 2011, Jong-Myon Kim

Page 20: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Multiplying Out and Factoring

To obtain a sum-of-product form Multiplying out using distributive laws

EACECDAB ''' Sum of product form :

EFCDBA )(Not in sum of product form :

BCEBCDABCAEADAEDABCA ))((Multiplying out and eliminating redundant terms :

BCEBCDABCEBCDBCEDA

)1(

BCEBCDA

20 마이크로프로세서© 2010, Jong-Myon Kim 20 Logic Design© 2011, Jong-Myon Kim

Page 21: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Multiplying Out and Factoring

To obtain a product of sum form all sums are the sum of single variable

Product of sum form : )'')(')('( ECAEDCBA

21 마이크로프로세서© 2010, Jong-Myon Kim 21 Logic Design© 2011, Jong-Myon Kim

Page 22: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

Circuits of SOP and POS Forms

Sum of product formSum of product formSum of product formSum of product form

P d t f fP d t f f

22 마이크로프로세서© 2010, Jong-Myon Kim 22 Logic Design© 2011, Jong-Myon Kim

Product of sum formProduct of sum form

Page 23: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

DeMorgan’s Laws

'')'('')'(

YXXYYXYX

DeMorgan’s LawsDeMorgan’s Laws'')'( YXXY

ProofProof

X Y X’ Y’ X + Y ( X + Y )’ X’ Y’ XY ( XY )’ X’ + Y’

0 00 1

1 11 0

01

10

10

00

11

110 1

1 01 1

1 00 10 0

111

000

000

001

110

110

''...'')'...( 321321 nn XXXXXXXX DeMorgan’s Laws for n variablesDeMorgan’s Laws for n variables

'...''')'...( 321321 nn XXXXXXXX ExampleExample

23 마이크로프로세서© 2010, Jong-Myon Kim 23 Logic Design© 2011, Jong-Myon Kim

'''')'()'( 321321321 XXXXXXXXX

Page 24: Unit 2. Boolean Algebraocw.ulsan.ac.kr/OCWData/2012/01/G01036-03/LectureNotes/[2... · 2012-07-12 · Objectives Topics introduced in this chapter Understand the basic operations

DeMorgan’s Laws

Inverse of A’B + AB’

ABBABBABABAABABAABBAABBAF

'''''' )')('()''()''()'''('

A B A’ B A B’ F = A’B+AB’ A’ B’ A B F’ = A’B’ + AB

0 00 1

01

00

01

10

00

100 1

1 01 1

100

010

110

000

001

001

Dual: ‘dual’ is formed by replacing AND with OR, OR with AND, 0 with 1, 1 with 0

CBACABCBACABCAB D )'()'( so ,')'(')''()''(

......)( ......)( XYZZYXZYXXYZ DD

24 마이크로프로세서© 2010, Jong-Myon Kim 24 Logic Design© 2012, Jong-Myon Kim

)()(,)()()(