Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

18
ECE2030 Introduction to Computer Engineering Lecture 6: Canonical (Standard) Forms Prof. Hsien-Hsin Sean Lee Prof. Hsien-Hsin Sean Lee School of Electrical and Computer School of Electrical and Computer Engineering Engineering Georgia Tech Georgia Tech

Transcript of Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

Page 1: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

ECE2030 Introduction to Computer Engineering

Lecture 6: Canonical (Standard) Forms

Prof. Hsien-Hsin Sean LeeProf. Hsien-Hsin Sean LeeSchool of Electrical and Computer EngineeringSchool of Electrical and Computer EngineeringGeorgia TechGeorgia Tech

Page 2: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

2

Boolean Variables• A multi-dimensional space spanned

by a set of n Boolean variables is denoted by BBnn

• A literalliteral is an instance (e.g. A) of a variable or its complement (Ā)

Page 3: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

3

SOP Form • A product of literals is called a product term product term

or a cube cube (e.g. Ā·B·C in BB33, or B·C in BB33)• Sum-Of-Product (SOP)Sum-Of-Product (SOP) Form: OROR of product

terms, e.g. ĀB+AC• A minterm minterm is a product term in which every

literal (or variable) appears in BBnn

– ĀBC is a minterm in ĀBC is a minterm in BB3 3 but not in but not in BB44. ABCD is a . ABCD is a minterm in minterm in BB44. .

• A canonicalcanonical (or standardstandard) SOP function:SOP function: – a sum of minterms corresponding to the input

combination of the truth table for which the function produces a “1”1” output.

Page 4: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

4

Minterms in BB33

Page 5: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

5

Canonical (Standard) SOP Function

m5 m4 m1 m0 CBACBACBACBAC)B,F(A,

5) 4, 1, set(0,one5) 4, 1, m(0,C)B,F(A,

m14 m9 m4 DABCDCBADCBAD)C,B,F(A,

14) 9, set(4,one14) 9, m(4,D)C,B,F(A,

Page 6: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

6

POS form (dual of SOP form)• A sum of literals is called a sum term sum term (e.g.

Ā+B+C in BB33, or (B+C) in BB33)• Product-Of-Sum (POS)Product-Of-Sum (POS) Form: ANDAND of sum

terms, e.g. (Ā+B)(A+C)• A maxterm maxterm is a sum term in which every

literal (or variable) appears in BBnn

– (Ā+B+C) is a maxterm in (Ā+B+C) is a maxterm in BB3 3 but not in but not in BB44. . A+B+C+D is a maxterm in A+B+C+D is a maxterm in BB44. .

• A canonicalcanonical (or standardstandard) POS function:POS function: – a product of maxterms corresponding to the input

combination of the truth table for which the function produces a “0”” output.

Page 7: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

7

Maxterms in BB33

Page 8: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

8

Canonical (Standard) POS Function

M2 M3 M6 M7 C)B)(ACBC)(ABA)(CBA(C)B,F(A,

7) 6, 3, set(2,zeroM(2,3,6,7)C)B,F(A,

M1M6M11 )DCBD)(ACB)(ADCBA(D)C,B,F(A,

11) 6, set(1,zero11) 6, M(1,D)C,B,F(A,

Page 9: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

9

Convert a Boolean to Canonical SOP• Expand the Boolean eqn into a SOP• Take each product term w/ a missing

literal A, “AND” () it with (A+Ā)

Page 10: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

10

Convert a Boolean to Canonical SOP3in BCBAF B

7) 3, 1, m(0,

ABCBCACBACBAC)B,F(A,

A B C FABC 0 0 0 1ABC 0 0 1 1ABC 0 1 0 0ABC 0 1 1 1ABC 1 0 0 0ABC 1 0 1 0ABC 1 1 0 0ABC 1 1 1 1

01

3

7

Minterms listedas 1’s

Page 11: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

11

Convert a Boolean to Canonical SOP

4Bin BCBAF

15) 14, 7, 6, 3, 2, 1, m(0, ABCDDABCBCDADBCA

CDBADCBADCBADCBAD)C,B,F(A,

3Bin )CA(BABF

7) 6, 4, 1, m(0,

ABCCABCBACBACBAC)B,F(A,

Page 12: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

12

Convert a Boolean to Canonical POS• Expand Boolean eqn into a POS

– Use distributive property• Take each sum term w/ a missing

variable A and OR it with A·Ā

Page 13: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

13

Convert a Boolean to Canonical POS

ive)(Distribut Z)Y)(X(X YZX Use Bin BCBAF 3

6) 5, 4, M(2,

C)BC)(ABA)(CBAC)(BA(F

C)BAC)(BC)(ABAC)(BA)(CBAC)(BA(F

C)BAC)(ABBA)(CCBA(F

C)BC)(AB)(BB)(A(F

C)BAB)(BA(F

BCBAF

Page 14: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

14

Convert a Boolean to Canonical POS

in BCBAF 3B

M(2,4,5,6)

C)BA)(CBAC)(BAC)(B(AF

BCBAF

A B C FABC 0 0 0 1ABC 0 0 1 1ABC 0 1 0 0ABC 0 1 1 1ABC 1 0 0 0ABC 1 0 1 0ABC 1 1 0 0ABC 1 1 1 1

4

6

2

5

Maxterms listedas 0’s

Page 15: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

15

Convert a Boolean to Canonical SOP3in BCBAF B

7) 3, 1, m(0,

ABCBCACBACBAC)B,F(A,

A B C FABC 0 0 0 1ABC 0 0 1 1ABC 0 1 0 0ABC 0 1 1 1ABC 1 0 0 0ABC 1 0 1 0ABC 1 1 0 0ABC 1 1 1 1

01

3

7

Minterms listedas 1’s

Page 16: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

16

Convert a Boolean to Canonical POS

ive)(Distribut Z)Y)(X(X YZX Use in )CA(BABF 3

B

M(2,3,5)

)CBA)(CBC)(AB(AF

)CBA)(CCB(AF

)CBA)(B(AF

)CA)(BCA)(AB)(BB(AF

)CA(AB )B(AB F

)CA(BABF

Page 17: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

17

Convert a Boolean to Canonical SOP

3Bin )CA(BABF

7) 6, 4, 1, m(0,

ABCCABCBACBACBAC)B,F(A,

Page 18: Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Canonical Forms

18

Interchange Canonical SOP and POS • For the same Boolean eqn

– Canonical SOP form is complementarycomplementary to its canonical POS form

– Use missing terms to interchange and • Examples

– F(A,B,C) = m(0,1,4,6,7)Can be re-expressed by– F(A,B,C) = M(2,3,5) Where 2, 3, 5 are the missing minterms in

the canonical SOP form