Top Banner
College of Computer and Information Sciences Department of Computer Science CSC 220: Computer Organization Unit 6 COMBINATIONAL CIRCUITS-2
43

Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Apr 27, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

College of Computer and Information Sciences Department of Computer Science

CSC 220: Computer Organization

Unit 6 COMBINATIONAL CIRCUITS-2

Page 2: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Objectives • Multiplexers • DeMultiplexers • Decoders • Encoders

Page 3: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

3

Page 4: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

4

Page 5: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

5

Page 6: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

6

Page 7: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

7

Page 8: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

8

Page 9: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

9

Page 10: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

10

Page 11: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

11

Page 12: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

12

Page 13: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

13

Implementing Functions with Multiplexers

Prof. Laxmikant Kale - university of illinois at urbana-champaign - Computer Sciences

Page 14: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Dr Mohamed A Berbar 14

Page 15: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Demultiplexer

Demultiplexer

Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected output line.

An example of a 1-to-4 demultiplexer:

S1 So Y0 Y1 Y2 Y3

0 0 D 0 0 00 1 0 D 0 01 0 0 0 D 01 1 0 0 0 D

demux Data D

Outputs

select

S1 S0

Y0 = D.S1'.S0'

Y1 = D.S1'.S0

Y2 = D.S1.S0'

Y3 = D.S1.S0

Page 16: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

16

Demultiplexer Takes one input Out to one of 2n possible outputs

Page 17: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

17

Decoder

Page 18: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

18

Page 19: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

19

Page 20: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

20

Page 21: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Decoders with Enable 21

Decoders with Enable (1/2) Decoders often come with an enable signal, so that the device is only

activated when the enable, E=1.

Truth table:

E X Y F0 F1 F2 F3

1 0 0 1 0 0 01 0 1 0 1 0 01 1 0 0 0 1 01 1 1 0 0 0 10 X X 0 0 0 0

F0 = EX'Y'

F1 = EX'Y

F2 = EXY'

F3 = EXY

X Y E

Circuit:

Page 22: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Demultiplexer 22

Demultiplexer Vs Decoder The demultiplexer is actually identical to a decoder with

enable, as illustrated below:

Exercise: Provide the truth table for above demultiplexer.

2x4 Decoder

D

S1

S0

Y0 = D.S1'.S0'

Y1 = D.S1'.S0

Y2 = D.S1.S0'

Y3 = D.S1.S0 E

Page 23: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

23

A Demux Using NAND Gates: A Decoder with an Enable

Page 24: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

24

Page 25: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

25

Page 26: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Dr Mohamed A Berbar 26

Page 27: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

27

Page 28: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Larger Decoders 28

Larger Decoders (2/6) 3x8 Dec

S2 S1 S0

w x y

0 1 : : 7

F0 = w'x'y' F1 = w'x'y

: :

F7 = wxy

2x4 Dec S1

S0

0 1 2 3

F0 = w'x'y' F1 = w'x'y F2 = w'xy' F3 = w'xy E

2x4 Dec S1

S0

0 1 2 3

F4 = wx'y' F5 = wx'y F6 = wxy' F7 = wxy E

w x y

0 0 0

0 0 0 0

1 0 0 0

0 = disabled

1 = enabled

Page 29: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Larger Decoders 29

Larger Decoders (3/6) 3x8 Dec

S2 S1 S0

w x y

0 1 : : 7

F0 = w'x'y' F1 = w'x'y

: :

F7 = wxy

2x4 Dec S1

S0

0 1 2 3

F0 = w'x'y' F1 = w'x'y F2 = w'xy' F3 = w'xy E

2x4 Dec S1

S0

0 1 2 3

F4 = wx'y' F5 = wx'y F6 = wxy' F7 = wxy E

w x y

0 0 1

0 0 0 0

0 1 0 0

0 = disabled

1 = enabled

Page 30: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Larger Decoders 30

Larger Decoders (4/6) 3x8 Dec

S2 S1 S0

w x y

0 1 : : 7

F0 = w'x'y' F1 = w'x'y

: :

F7 = wxy

2x4 Dec S1

S0

0 1 2 3

F0 = w'x'y' F1 = w'x'y F2 = w'xy' F3 = w'xy E

2x4 Dec S1

S0

0 1 2 3

F4 = wx'y' F5 = wx'y F6 = wxy' F7 = wxy E

w x y

1 1 0

0 0 1 0

0 0 0 0

1 = enabled

0 = disabled

Page 31: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Larger Decoders 31

Larger Decoders (5/6) Question: Construct a 4x16 decoder from

two 3x8 decoders with 1-enable.

4x16 Dec S3

S2 S1 S0

w x y z

0 1 : :

15

F0 F1 : :

F15

3x8 Dec S2

S1 S0

0 1 : 7

F0 F1 :

F7 E

3x8 Dec S2

S1 S0

0 1 : 7

F8 F9 :

F15 E

w x y z

Page 32: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

32

Page 33: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

33 Prof. Laxmikant Kale - university of illinois at urbana-champaign - Computer

Sciences

Implementing Functions with Decoder

Page 34: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

Dr Mohamed A Berbar 34

Page 35: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

35

Page 36: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

36

Page 37: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Decoders: Implementing Functions 37

Decoders: Implementing Functions Example: Full adder

3x8 Dec

S2

S1

S0

x

y

z

0 1 2 3 4 5 6 7

S

C

x y z C S0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

1 0 0 0 0 0 0 0

0

0

0 0 0

Page 38: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Decoders: Implementing Functions 38

Decoders: Implementing Functions 3x8 Dec

S2

S1

S0

x

y

z

0 1 2 3 4 5 6 7

S

C

x y z C S0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

0 0 0 0 0 0 0 1

1

1

1 1 1

Page 39: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

CS1104-7 Reducing Decoders 39

Example:

F(a,b,c) = ∑ m(4,6,7)

Using a 3×8 decoder (assuming 1-enable and active-high outputs).

3x8 Dec

S2

S1

S0

a

b

c

0 1 2 3 4 5 6 7

F

EN

1

Page 40: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

40

Encoder Encoder is the opposite of decoder 2n inputs or less – 10 inputs in “Decimal to BCD” encoder: I0, I1, I2, I3,

…, I9

n outputs 4 output lines “Decimal to BCD”encoder

Page 41: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

41

Truth Table: 8-to-3 Binary Encoder

Page 42: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

42

Inputs are Minterms Can OR the minterms appropriately to get each of the outputs

A0, A1, A2 Example: A0 = D1 + D3 + D5 + D7

Page 43: Unit 6 COMBINATIONAL CIRCUITS -2 · Demultiplexer CS1104-7 Demultiplexer Given an input line and a set of selection lines, the demultiplexer will direct data from input to a selected

43

Generating Outputs using OR of Minterms

A0 = D1 + D3 + D5 + D7

A1 = D2 + D3 + D6 + D7

A2 = D4 + D5 + D6 + D7