23
ECEN 301 Discussion #22 – Combinational Logic 1 Remember and be Thankful 2 Nephi 1:9, 20 : 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as those whom the Lord God shall bring out of the land of Jerusalem shall keep his commandments, they shall prosper upon the face of this land; and they shall be kept from all other nations, that they may possess this land unto themselves. And if it so be that they shall keep his commandments they shall be blessed upon the face of this land, and there shall be none to molest them, nor to take away the land of their inheritance; and they shall dwell safely forever. 20 And he hath said that: Inasmuch as ye shall keep my commandments ye shall prosper in the land; but inasmuch as ye will not keep my commandments ye shall be cut off from my presence.

ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

Embed Size (px)

Citation preview

Page 1: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 1

Remember and be Thankful

2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as those whom

the Lord God shall bring out of the land of Jerusalem shall keep his commandments, they shall prosper upon the face of this land; and they shall be kept from all other nations, that they may possess this land unto themselves. And if it so be that they shall keep his commandments they shall be blessed upon the face of this land, and there shall be none to molest them, nor to take away the land of their inheritance; and they shall dwell safely forever.

  20 And he hath said that: Inasmuch as ye shall keep my commandments ye shall prosper in the land; but inasmuch as ye will not keep my commandments ye shall be cut off from my presence.

Page 2: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 2

Lecture 22 – Boolean Algebra & Combinational Logic

Page 3: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 3

Boolean Algebra

Boolean Algebra: the mathematics associated with binary numbers• Developed by George Boole in 1854

Variables in boolean algebra can take only one of two possible values:0 → FALSE1 → TRUE

Page 4: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 4

Rules of Boolean Algebra

ZXYXZXZYYX

YXYXX

ZYXZXYX

XYXX

XZXX

.19

.18

)()(.17

)(.61

.15

XX

XX

XXX

XX

X

XX

XXX

X

XX

.9

0.8

.7

1.6

00.5

1.4

.3

11.2

0.1

ZXYXZYX

ZYXZYX

ZYXZYX

XYYX

XYYX

)(.14

)()(.13

)()(.12

.11

.10

Page 5: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 5

DeMorgan’s Law

BABA

BABA

To distribute the bar,change the operation.

NOR Symbols

NAND Symbols

Page 6: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 6

Boolean Algebra

Example1: simplify the following function

ACDBCDBDADBAOUT

Page 7: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 7

Boolean Algebra

Example1: simplify the following function

CADOUT

DACDOUT

DABCDOUT

BCDCDDAOUT

BCDCADOUT

BCDACADOUT

ACDBCDDAOUT

ACDBCDBBDAOUT

ACDBCDBDADBAOUT

14 Rule

2 Rule)1(

14 Rule

14 Rule

18 Rule

14 Rule

4 Rule

14 Rule

Page 8: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 8

Boolean Algebra

Example2: Simplify the equation created by the following truth table

A B C Z0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1

Page 9: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 9

Boolean Algebra

Example2: Simplify the equation created by the following truth table

A B C Z0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1

ABCCABCBACBABCACBAZ

Page 10: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 10

Boolean Algebra

Example2: Simplify the equation created by the following truth table

A B C Z0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1

CAZ

ACAZ

BBACAZ

ABBACAZ

CCABCCBABBCAZ

ABCCABCBACBABCACBAZ

Page 11: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 11

Boolean Algebra

Example3: Determine the truth tableA B C Z0 0 0 ?

0 0 1 ?

0 1 0 ?

0 1 1 ?

1 0 0 ?

1 0 1 ?

1 1 0 ?

1 1 1 ?

A

B

C

Z

Page 12: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 12

Boolean Algebra

Example3: Determine the truth tableA B C x1 Z

0 0 0 0 ?

0 0 1 0 ?

0 1 0 1 ?

0 1 1 1 ?

1 0 0 1 ?

1 0 1 1 ?

1 1 0 1 ?

1 1 1 1 ?

A

B

C

Z

BAx 1

Page 13: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 13

Boolean Algebra

Example3: Determine the truth tableA B C x1 x2 Z

0 0 0 0 1 ?

0 0 1 0 1 ?

0 1 0 1 1 ?

0 1 1 1 0 ?

1 0 0 1 1 ?

1 0 1 1 1 ?

1 1 0 1 1 ?

1 1 1 1 0 ?

A

B

C

Z

BAx 1

BCx 2

Page 14: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 14

Boolean Algebra

Example3: Determine the truth tableA B C x1 x2 x3 Z

0 0 0 0 1 0 ?

0 0 1 0 1 1 ?

0 1 0 1 1 0 ?

0 1 1 1 0 1 ?

1 0 0 1 1 1 ?

1 0 1 1 1 1 ?

1 1 0 1 1 1 ?

1 1 1 1 0 1 ?

A

B

C

Z

BAx 1

BCx 2CAx 3

Page 15: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 15

Boolean Algebra

Example3: Determine the truth tableA B C x1 x2 x3 Z

0 0 0 0 1 0 0

0 0 1 0 1 1 0

0 1 0 1 1 0 0

0 1 1 1 0 1 0

1 0 0 1 1 1 1

1 0 1 1 1 1 1

1 1 0 1 1 1 1

1 1 1 1 0 1 0

A

B

C

Z

BAx 1

BCx 2CAx 3 CABCBAZ

Page 16: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 16

Boolean Algebra

Example3: Determine the truth tableA B C x1 x2 x3 Z

0 0 0 0 1 0 0

0 0 1 0 1 1 0

0 1 0 1 1 0 0

0 1 1 1 0 1 0

1 0 0 1 1 1 1

1 0 1 1 1 1 1

1 1 0 1 1 1 1

1 1 1 1 0 1 0

BCA

CBCA

CBACA

CBABBCA

CABCBACBA

CABCBAZ

Page 17: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 17

Combinational Logic

Decoders

Multiplexers

Page 18: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 18

Decoders

• with n inputs has 2n outputs

X

Y

Z

W

2-to-4Decoder

A B

W

X

Y

Z

DECODERSymbol

Page 19: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 19

Decoders• Write the truth table

X

Y

Z

W

Page 20: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 20

Decoders• Write the truth table

X

Y

Z

W

A B W X Y Z0 0 1 0 0 0

0 1 0 1 0 0

1 0 0 0 1 0

1 1 0 0 0 1

Page 21: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 21

Multiplexors• Connect one of its inputs to its output according to

select signals

• Useful for selecting one from a collection of data inputs.

• Usually has 2n inputs and n select lines.

A B

S

C

1 0

MULTIPLEXOR Symbol

Page 22: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 22

Multiplexors• Write the truth table

A B

S

C

1 0

MULTIPLEXOR Symbol

A B S C0 0 0 ?

0 0 1 ?

0 1 0 ?

0 1 1 ?

1 0 0 ?

1 0 1 ?

1 1 0 ?

1 1 1 ?

Page 23: ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as

ECEN 301 Discussion #22 – Combinational Logic 23

Multiplexors• Write the truth table

A B

S

C

1 0

MULTIPLEXOR Symbol

A B S C0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1