Topic 6_MSI

88
FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 1 Topic 6: MSI Components

Transcript of Topic 6_MSI

Page 1: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 1

Topic 6:

MSI Components

Page 2: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 2

Combinational Circuits: MSI Components

Adders/Substractors

Half/Full/Ripple Adders

Substractors

Using Adders as Substractors

Comparators

Page 3: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 3

Combinational Circuits: MSI Components

DecodersImplementing Functions with DecodersDecoders with EnableLarger DecodersStandard MSI DecodersImplementing Functions with Decoders (2)Useful MSI circuitsReducing Decoders

Page 4: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 4

Combinational Circuits: MSI Components

Encoder

Demultiplexer

Multiplexer

Multiplexer IC Package

Larger Multiplexers

Standard MSI Multiplexer

Implementing Functions with Multiplexers

Implementing Functions with Smaller Multiplexers

Page 5: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 5

Adders/Subtractors

Half AdderFull AdderRipple Adder

Full SubtractorRipple SubtractorAdder/Subtractor Circuit

Page 6: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 6

Half Adder: adds two 1-bit operands

Truth table :

X Y HS=(X+Y) CO0 0 0 00 1 1 01 0 1 01 1 0 1

Y

XH S

CO

YXHS ⊕=

YXCO •=

Page 7: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 7

Full Adders: provide for carries between bit positions

Basic building block is “full adder”1-bit-wide adder, produces sum and carry outputs

Truth table: X Y Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1

S is 1 if an odd number of inputs are 1.

COUT is 1 if two or more of the inputs are 1.

Recall: Table 2-3, pp32

Page 8: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 8

Full-adder circuit

Page 9: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 9

Ripple adder

Speed limited by carry chainFaster adders eliminate or limit carry chain

2-level AND-OR logic ==> 2n product terms3 or 4 levels of logic, carry lookahead

Page 10: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 10

74x2834-bit adder

Uses carry lookaheadinternally

74x283

A0

C0

B0

S0

S1

7

4

10

5

6

A1

B1

3

2

A2

B2

14

15

A3

B3

12

11

S2

S3

9C4

1

13

Cop

yrig

ht ©

200

0 by

Pre

ntic

e H

all,

Inc.

Dig

ital D

esig

n P

rinci

ples

and

Pra

ctic

es, 3

/e

Page 11: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 11

16-bit group-ripple adder

Page 12: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 12

Subtraction

Subtraction is the same as addition of the two’s complement.The two’s complement is the bit-by-bit complement plus 1.Therefore, X – Y = X + Y’ + 1

Page 13: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 13

Full subtractor = full adder, almost

X,Y are n-bit unsigned binary numbers

Addition : S = X + Y

Subtraction : D = X - Y = X + (-Y) = = X+ (Two’s Complement of Y)= X+ (One’s Complement of Y) + 1= X+ Y’+ 1

Page 14: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 14

Using Adder as a Subtractor

Ripple Adder can be used as a subtractor by inverting Y and setting the initial carry ( CIN ) to 1

Page 15: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 15

Comparators

Compares Two binary words and indicate if they are equal

Magnitude Comparators :

AComparator OUTPUT

B

AComparator

A=B

BA>B A<B

Page 16: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 16

Equality Comparators

1-bit comparator

4-bit comparator

EQ_L

Page 17: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 17

Iterative Comparatorprimary inputs

primary outputs

moduleCI CO

PIC2C1C0 Cn–1 Cn

POn–1

PIn–1

PO

moduleCI CO

PI

PO

moduleCI CO

PI

PO

PI1

PO1PO0

PI0 cascadinginput

cascadingoutput

boundaryinputs

boundaryoutputsCopyright © 2000 by Prentice Hall, Inc.

Digital Design Principles and Practices, 3/e

Page 18: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 18

Multibit Iterative Comparator

XCMP

Y

X0 Y0

EQI EQO

XCMP

Y

EQI EQO

XCMP

Y

EQI EQO

XCMP

Y

EQI EQOEQ1

X1 Y1

EQ2

X2 Y2 X(N–1) Y(N–1)

EQ3 EQNEQ(N–1)

(b)

1

EQO

EQI

X Y(a)

CMP

Copyright © 2000 by Prentice Hall, Inc.Digital Design Principles and Practices, 3/e

Page 19: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 19

MSI Comparator : 7485

B0

A1

B1

A2

B2

A3

A0

B3

74x85

A<BIN

A=BIN

A>BIN

A<BOUT

A=B OUT

A>BOUT

4 bit comparator3 outputs : A=B, A<B, A>B3 Cascading inputs Functional Output equations :(A>B OUT)= (A>B)+(A=B).(A>B IN)(A<B OUT)= (A<B)+(A=B).(A<B IN)(A=B OUT)= (A=B).(A=B IN)Cascading inputs initial values : (A=B IN) =1(A>B IN) =0(A<B IN) =0

Page 20: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 20

8 bit Comparator

A<B

A=B

A>B

B0

A1

B1

A2

B2

A3

A0

B3

74x85

A<BIN

A=BIN

A>BIN

A<BOUT

A=B OUT

A>BOUT

B0

A1

B1

A2

B2

A3

A0

B3

74x85

A<BIN

A=BIN

A>BIN

A<BOUT

A=B OUT

A>BOUT

B0

A1

B1

A2

B2

A3

A0

B3

B4

A5

B5

A6

B6

A7

A4

B7

+5V

Most Significant bitsLeast Significant bits

Page 21: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 21

8-bit Magnitude Comparator

Page 22: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 22

Other conditions

Page 23: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 23

Useful MSI circuits

Four common and useful MSI circuits are:DecoderDemultiplexerEncoderMultiplexer

Block-level outlines of MSI circuits:

encodercodeentitydecoder

code entity

mux datainput

select

demuxdata output

select

Page 24: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 24

Decoders

Codes are frequently used to represent entities, e.g. your name is a code to denote yourself (an entity!).

These codes can be identified (or decoded) using a decoder. Given a code, identify the entity.

Convert binary information from n input lines to (max. of) 2n

output lines.

Known as n-to-m-line decoder, or simply n:m or n×m decoder (m ≤ 2n).

May be used to generate 2n (or fewer) minterms of n input variables.

Page 25: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 25

Decoders

In general, for an n-bit code, a decoder could select up to 2n

lines:

: :n-bitcode

n to 2n

decoderup to 2n

output lines

Page 26: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 26

Decoders

Example: if codes 00, 01, 10, 11 are used to identify four lightbulbs, we may use a 2-bit decoder:

2x4Dec2-bit

codeX

Y

F0 F1 F2 F3

Bulb 0Bulb 1Bulb 2Bulb 3

This is a 2×4 decoder which selects an output line based on the 2-bit code supplied.Truth table: X Y F0 F1 F2 F3

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

Page 27: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 27

Decoders

X Y F0 F1 F2 F30 0 1 0 0 00 1 0 1 0 01 0 0 0 1 01 1 0 0 0 1

F0 = X'.Y'

F1 = X'.Y

F2 = X.Y'

F3 = X.Y

X Y

From truth table, circuit for 2×4 decoder is:Note: Each output is a 2-variable minterm (X'.Y', X'.Y, X.Y' or X.Y)

Page 28: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 28

Decoders

Design a 3×8 decoder.

F1 = x'.y'.z

x zy

F0 = x'.y'.z'

F2 = x'.y.z'

F3 = x'.y.z

F5 = x.y'.z

F4 = x.y'.z'

F6 = x.y.z'

F7 = x.y.z

x y z F0 F1 F2 F3 F4 F5 F6 F70 0 0 1 0 0 0 0 0 0 00 0 1 0 1 0 0 0 0 0 00 1 0 0 0 1 0 0 0 0 00 1 1 0 0 0 1 0 0 0 01 0 0 0 0 0 0 1 0 0 01 0 1 0 0 0 0 0 1 0 01 1 0 0 0 0 0 0 0 1 01 1 1 0 0 0 0 0 0 0 1

Application? Binary-to-octal conversion.

Page 29: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 29

Decoders: Implementing Functions

A Boolean function, in sum-of-minterms form decoder to generate the minterms, and an OR gate to form the sum.

Any combinational circuit with n inputs and m outputs can be implemented with an n:2n decoder with m OR gates.

Good when circuit has many outputs, and each function is expressed with few minterms.

Page 30: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 30

Decoders: Implementing Functions

Example: Full adderS(x, y, z) = Σ m(1,2,4,7)C(x, y, z) = Σ m(3,5,6,7)

3x8Dec

S2

S1

S0

x

y

z

01234567

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

Page 31: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 31

Decoders: Implementing Functions

3x8Dec

S2

S1

S0

x

y

z

01234567

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

10000000

0

0

000

Page 32: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 32

Decoders: Implementing Functions

3x8Dec

S2

S1

S0

x

y

z

01234567

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

01000000

1

0

001

Page 33: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 33

Decoders: Implementing Functions

3x8Dec

S2

S1

S0

x

y

z

01234567

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

00000001

1

1

111

Page 34: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 34

Decoders with Enable

Decoders often come with an enable signal, so that the device is only activated when the enable, E=1.

Truth table:

F0 = EX'Y'

F1 = EX'Y

F2 = EXY'

F3 = EXY

X Y E

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

Circuit:

Page 35: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 35

Decoders with Enable

In the previous slide, the decoder has a one-enable signal, that is, the decoder is enabled with E=1.

In most MSI decoders, enable signal is zero-enable, usually denoted by E’ (or E). The decoder is enabled when the signal is zero.

E' X Y F0 F1 F2 F3

0 0 0 1 0 0 00 0 1 0 1 0 00 1 0 0 0 1 00 1 1 0 0 0 11 X X 0 0 0 0

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

Decoder with 1-enable Decoder with 0-enable

Page 36: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 36

Larger Decoders

3x8Dec

S2S1S0

wxy

01::7

F0 = w'x'y'F1 = w'x'y::F7 = wxy

Larger decoders can be constructed from smaller ones.

For example, a 3-to-8 decoder can be constructed from two 2-to-4 decoders (with one-enable), as follows:

2x4Dec

S1S0

0123

F0 = w'x'y'F1 = w'x'yF2 = w'xy'F3 = w'xyE

2x4Dec

S1S0

0123

F4 = wx'y'F5 = wx'yF6 = wxy'F7 = wxyE

wxy

Page 37: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 37

Larger Decoders

3x8Dec

S2S1S0

wxy

01::7

F0 = w'x'y'F1 = w'x'y::F7 = wxy

2x4Dec

S1S0

0123

F0 = w'x'y'F1 = w'x'yF2 = w'xy'F3 = w'xyE

2x4Dec

S1S0

0123

F4 = wx'y'F5 = wx'yF6 = wxy'F7 = wxyE

wxy

000

0000

1000

0 = disabled

1 = enabled

Page 38: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 38

Larger Decoders

3x8Dec

S2S1S0

wxy

01::7

F0 = w'x'y'F1 = w'x'y::F7 = wxy

2x4Dec

S1S0

0123

F0 = w'x'y'F1 = w'x'yF2 = w'xy'F3 = w'xyE

2x4Dec

S1S0

0123

F4 = wx'y'F5 = wx'yF6 = wxy'F7 = wxyE

wxy

001

0000

0100

0 = disabled

1 = enabled

Page 39: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 39

Larger Decoders

3x8Dec

S2S1S0

wxy

01::7

F0 = w'x'y'F1 = w'x'y::F7 = wxy

2x4Dec

S1S0

0123

F0 = w'x'y'F1 = w'x'yF2 = w'xy'F3 = w'xyE

2x4Dec

S1S0

0123

F4 = wx'y'F5 = wx'yF6 = wxy'F7 = wxyE

wxy

110

0010

0000

1 = enabled

0 = disabled

Page 40: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 40

Larger Decoders

4x16DecS3

S2S1S0

wxyz

01::

15

F0F1::F15

Construct a 4x16 decoder from two 3x8 decoders with 1-enable.

3x8Dec

S2S1S0

01:7

F0F1:F7E

3x8Dec

S2S1S0

01:7

F8F9:F15E

wxyz

Page 41: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 41

Larger Decoders

Note: The input, w and its complement, w', is used to select either one of the two smaller decoders.

Decoders may also have zero-enable and/or negated outputs. (Normal outputs = active high; negated outputs = active low.)

Exercise: What modifications must be made to provide an ENABLE input for the 3x8 decoder (2 slides ago) and the 4x16 decoder (previous slide) created?

Exercise: How to construct a 4x16 decoder using five 2x4 decoders with enable?

Page 42: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 42

Standard MSI Decoders

74138 (3-to-8 decoder)

74138 decoder module. (a) Logic circuit. (b) Package pin configuration.

Page 43: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 43

Standard MSI Decoders

74138 decoder module.(c) Function table.

74138 decoder module. (d) Generic symbol. (e) IEEE standard logic symbol.

Source:The Data Book Volume 2, Texas Instruments Inc.,1985

Negated outputs

Page 44: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 44

Decoders: Implementing Functions (2)

Example: Implement the following logic function using decoders and logic gates

f(Q,X,P) = ∑ m(0,1,4,6,7) = ∏ M(2,3,5)

We may implement the function in several ways:

Use a decoder (with active-high outputs) with an OR gate:f(Q,X,P) = m0 + m1 + m4 + m6 + m7

Use a decoder (with active-low outputs) with a NAND gate:f(Q,X,P) = ( m0' . m1' . m4' . m6' . m7' )'

Use a decoder (with active-high outputs) with a NOR gate:f(Q,X,P) = ( m2 + m3 + m5 )' [ = M2.M3.M5]

Use a decoder (with active-low outputs) with an AND gate:f(Q,X,P) = m2' . m3' . m5'

Page 45: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 45

Decoders: Implementing Functions (2)

3x8Dec

ABC

QXP

01234567

f(Q,X,P) f(Q,X,P)

3x8Dec

ABC

QXP

01234567

3x8Dec

ABC

QXP

01234567

f(Q,X,P) f(Q,X,P)3x8Dec

ABC

QXP

01234567

(a) Active-high decoder with OR gate. (b) Active-low decoder with NAND gate.

(c) Active-high decoder with NOR gate. (d) Active-low decoder with AND gate.

f(Q,X,P) = ∑ m(0,1,4,6,7)

Page 46: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 46

Reducing Decoders

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

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

3x8Dec

S2

S1

S0

a

b

c

01234567

F

EN

1

Page 47: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 47

Reducing Decoders

We have seen that a decoder may be constructed from smaller decoders.Below are just some ways of constructing a 3×8 decoder. (Explore other ways youself!)

Using two 2×4 decoders with an inverter.

2x4Dec

S1S0

0123E

2x4Dec

S1S0

0123E

abc

a'

a

Page 48: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 48

Reducing Decoders

Using two 2×4 decoders and a 1×2 decoder.

2x4Dec

S1S0

0123E

2x4Dec

S1S0

0123E

bc

a'

a

1x2Dec

S 01

Ea

1

Verify this circuit yourself!

Page 49: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 49

Reducing Decoders

Using four 1×2 decoders and a 2×4 decoder.

Verify this circuit yourself!

2x4Dec

S1S0

0123E

1x2Dec

S 01

E

ab

1

1x2Dec

S 01

E

1x2Dec

S 01

E

1x2Dec

S 01

E

c

c

c

c

Page 50: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 50

Reducing Decoders

Using smaller decoders, sometimes we may be able to save some decoders.

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

F

2x4Dec

S1S0

0123E

2x4Dec

S1S0

0123E

bc

a'

a

1x2Dec

S 01

Ea

1

Question: Do we really need this decoder for F?

Page 51: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 51

Reducing Decoders

So we can save a decoder.

F

2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

Similarly, we can save 2 small decoders below.

2x4Dec

S1S0

0123E

ab

1

1x2Dec

S 01

E

1x2Dec

S 01

E

c

c

F

Page 52: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 52

Reducing Decoders

Second example: F(a,b,c) = ∑ m(0,1,2,3,6)

F

2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

2x4Dec

S1S0

0123E

bc Question: Can we

do something about this?

Page 53: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 53

Reducing Decoders

Second example: F(a,b,c) = ∑ m(0,1,2,3,6)Yes, we may remove the top 2×4 decoder, and connect the appropriate output from the 1×2 decoder directly to the OR gate.

F

2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

Verify that this circuit is correct!

Page 54: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 54

Reducing Decoders

Third example: F(a,b,c) = ∑ m(0,3,4,7)

We have the same pattern of outputs from the 2 decoders (i.e. we take the first and fourth outputs from each decoder). Can we do something about it?

F2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

2x4Dec

S1S0

0123E

bc

Page 55: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 55

Reducing Decoders

Third example: F(a,b,c) = ∑ m(0,3,4,7)If we have the same pattern of outputs from 2 or more decoders at the second level, we may keep one decoder, and use an OR gate on the corresponding outputs from the first-level decoder.

F2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

Additional OR gate

Verify that this circuit is correct!

Page 56: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 56

Reducing Decoders

Third example: F(a,b,c) = ∑ m(0,3,4,7)Can we still simplify the circuit?

F2x4Dec

S1S0

0123E

bc

1x2Dec

S 01

Ea

1

This may be eliminated. (why?)

Because this is (a' + a) = 1

F2x4Dec

S1S0

0123E

bc

1

Page 57: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 57

Reducing Decoders

Summary:If no outputs are needed from a 2nd-level decoder, just remove the decoder.If all outputs are needed from a 2nd-level decoder, remove the decoder, and connect the corresponding output from the 1st-level decoder to the OR gate.If the set of outputs is the same for 2 or more decoders at the 2nd level, keep one of the decoders and remove the rest. Add an OR gate to take in the appropriate outputs from the 1st-level decoder.

The above procedure may not guarantee a circuit that has the least number of decoders. However, it is easy to follow. (To obtain the optimal circuit in general, we need to play around with the inputs to the decoders, which may be hard.)

Page 58: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 58

Reducing Decoders

Apply what you learned to verify the circuit below for this function: F(a,b,c,d) = ∑ m(0,1,2,3,4,5,12,13)

F2x4Dec

S1S0

0123E

cd

1

2x4Dec

S1S0

0123E

ab

Page 59: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 59

Encoder

Encoding is the converse of decoding.Given a set of input lines, where one has been selected, provide a code corresponding to that line.Contains 2n (or fewer) input lines and n output lines.Implemented with OR gates.An example:

4-to-2 Encoder

F0

F1

F2F3

D0

D1

Select via switches 2-bits

code

Page 60: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 60

Encoder

Truth table:F0 F1 F2 F3 D1 D01 0 0 0 0 00 1 0 0 0 10 0 1 0 1 00 0 0 1 1 10 0 0 0 X X0 0 1 1 X X0 1 0 1 X X0 1 1 0 X X0 1 1 1 X X1 0 0 1 X X1 0 1 0 X X1 0 1 1 X X1 1 0 0 X X1 1 0 1 X X1 1 1 0 X X1 1 1 1 X X

Page 61: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 61

Encoder

With the help of K-map (and don’t care conditions), can obtain:

D0 = F1 + F3D1 = F2 + F3

which correspond to circuit:

F0

F1

F2

F3D1

D0 Simple 4-to-2 encoder

Page 62: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 62

Encoder

Example: Octal-to-binary encoder.At any one time, only one input line has a value of 1.Otherwise, need priority encoder (not covered).

Inputs Outputs

D0 D1 D2 D3 D4 D5 D6 D7 x y z1 0 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0 10 0 1 0 0 0 0 0 0 1 00 0 0 1 0 0 0 0 0 1 10 0 0 0 1 0 0 0 1 0 00 0 0 0 0 1 0 0 1 0 10 0 0 0 0 0 1 0 1 1 00 0 0 0 0 0 0 1 1 1 1

Page 63: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 63

Encoder

Example: Octal-to-binary encoder.

D0

D1

D2

D3

D4

D5

D6

D7z = D1 + D3 + D5 + D7

y = D2 + D3 + D6 + D7

x = D4 + D5 + D6 + D7

8-to-3 encoder

Exercise: Can you design a 2n-to-n encoder without the K-map?

Page 64: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 64

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

demuxData D

Outputs

select

S1 S0

Y0 = D.S1'.S0'

Y1 = D.S1'.S0

Y2 = D.S1.S0'

Y3 = D.S1.S0

Page 65: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 65

Demultiplexer

The demultiplexer is actually identical to a decoder with enable, as illustrated below:

2x4 Decoder

D

S1

S0

Y0 = D.S1'.S0'

Y1 = D.S1'.S0

Y2 = D.S1.S0'

Y3 = D.S1.S0E

Exercise: Provide the truth table for above demultiplexer.

Page 66: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 66

Multiplexer

A multiplexer is a device which has(i) a number of input lines(ii) a number of selection lines(iii) one output line

It steers one of 2n inputs to a single output line, using nselection lines. Also known as a data selector.

2n:1Multiplexerinputs output:

...select

Page 67: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 67

Multiplexer

Truth table for a 4-to-1 multiplexer:

I0 I1 I2 I3 S1 S0 Yd0 d1 d2 d3 0 0 d0d0 d1 d2 d3 0 1 d1d0 d1 d2 d3 1 0 d2d0 d1 d2 d3 1 1 d3

S1 S0 Y0 0 I00 1 I11 0 I21 1 I3

4:1MUX

Y

Inputs

select

S1 S0

I0I1I2I3

0123

Output mux Y

Inputs

selectS1 S0

I0I1I2I3

Page 68: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 68

Multiplexer

Output of multiplexer is“sum of the (product of data lines and selection lines)”

Example: the output of a 4-to-1 multiplexer is:Y = I0.(S1’.S0') + I1.(S1’.S0) + I2.(S1.S0') + I3.(S1.S0)

A 2n-to-1-line multiplexer, or simply 2n:1 MUX, is made from an n: 2n decoder by adding to it 2n input lines, one to each AND gate.

Page 69: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 69

Multiplexer

S1 S0

I0

I1

I2

I3

Y

S1 S0

0 1 2 32-to-4

Decoder

I0

I1

I2

I3

Y

Four-to-one multiplexer design.

Page 70: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 70

Multiplexer

An application:

Helps share a single communication line among a number of devices.At any time, only one source and one destination can use the communication line.

Page 71: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 71

Multiplexer IC Package

Some IC packages have a few multiplexers in each package. The selection and enable inputs are common to all multiplexers within the package.

S(select)

A0

A1

A2

A3

B0

B1

B2

B3

E'(enable)

Y0

Y1

Y2

Y3

E’ S Output Y1 X all 0’s0 0 select A0 1 select B

Quadruple 2:1 multiplexer

Page 72: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 72

Larger Multiplexers

Larger multiplexers can be constructed from smaller ones.An 8-to-1 multiplexer can be constructed from smaller multiplexers like this (note placement of selector lines):

4:1 MUX

I0I1I2I3

S1 S0

4:1 MUX

I4I5I6I7

S1 S0

2:1 MUX

S2

Y

S2 S1 S0 Y0 0 0 I00 0 1 I10 1 0 I20 1 1 I31 0 0 I41 0 1 I51 1 0 I61 1 1 I7

Page 73: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 73

Larger Multiplexers

4:1 MUX

I0I1I2I3

S1 S0

4:1 MUX

I4I5I6I7

S1 S0

2:1 MUX

S2

Y

I0

I4

I0

S2 S1 S0 Y0 0 0 I00 0 1 I10 1 0 I20 1 1 I31 0 0 I41 0 1 I51 1 0 I61 1 1 I7

When S2S1S0 = 000

Page 74: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 74

Larger Multiplexers

4:1 MUX

I0I1I2I3

S1 S0

4:1 MUX

I4I5I6I7

S1 S0

2:1 MUX

S2

Y

I1

I5

I1

S2 S1 S0 Y0 0 0 I00 0 1 I10 1 0 I20 1 1 I31 0 0 I41 0 1 I51 1 0 I61 1 1 I7

When S2S1S0 = 001

Page 75: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 75

Larger Multiplexers

4:1 MUX

I0I1I2I3

S1 S0

4:1 MUX

I4I5I6I7

S1 S0

2:1 MUX

S2

Y

I2

I6

I6

S2 S1 S0 Y0 0 0 I00 0 1 I10 1 0 I20 1 1 I31 0 0 I41 0 1 I51 1 0 I61 1 1 I7

When S2S1S0 = 110

Page 76: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 76

Larger Multiplexers

Another implementation of an 8-to-1 multiplexer using smaller multiplexers:

YI0

When S2S1S0 = 000

4:1 MUX

S2 S1

I0I1

2:1 MUX

S0I2I3

2:1 MUX

S0

I4I5

2:1 MUX

S0 I6I7

2:1 MUX

S0

I0

I4

I2

I6Q: Can we use only 2:1 multiplexers?

S2 S1 S0 Y0 0 0 I00 0 1 I10 1 0 I20 1 1 I31 0 0 I41 0 1 I51 1 0 I61 1 1 I7

Page 77: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 77

Larger Multiplexers

A 16-to-1 multiplexer can be constructed from five 4-to-1 multiplexers:

Page 78: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 78

Standard MSI Multiplexer

74151A 8-to-1 multiplexer. (a) Package configuration. (b) Function table.

Page 79: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 79

Standard MSI Multiplexer

74151A 8-to-1 multiplexer. (c) Logic diagram. (d) Generic logic symbol. (e) IEEE standard logic symbol.

Source: The TTL Data Book Volume 2. Texas Instruments Inc.,1985.

Page 80: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 80

Multiplexers: Implementing Functions

A Boolean function can be implemented using multiplexers.

A 2n-to-1 multiplexer can implement a Boolean function of ninput variables, as follows:

(i) Express in sum-of-minterms form.Example: F(A,B,C) = A'B'C + A'BC + AB'C + ABC'

= Σ m(1,3,5,6)

(ii) Connect n variables to the n selection lines.

(iii) Put a '1' on a data line if it is a minterm of the function, '0' otherwise.

Page 81: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 81

Multiplexers: Implementing Functions

This method works because:Output = m0.I0 + m1.I1 + m2.I2 + m3.I3

+ m4.I4 + m5.I5 + m6.I6 + m7.I7

Supplying ‘1’ to I1,I3,I5,I6 , and ‘0’ to the rest:

Output = m1 + m3 + m5 + m6

F(A,B,C) = Σ m(1,3,5,6)

mux

A B C

01234567

01010110

F

Page 82: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 82

Multiplexers: Implementing Functions

Example: Use a 74151A to implement:f(x1,x2,x3) = ∑ m(0,2,3,5)

Realization of f(x1,x2,x3) = ∑m(0,2,3,5).(a)Truth table. (b)Implementation with 74151A.

Page 83: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 83

Using Smaller Multiplexers

Earlier, we saw how a 2n-to-1 multiplexer can be used to implement any Boolean function of n (input) variables.

However, we can use a single smaller 2(n-1)-to-1 multiplexer to implement any Boolean function of n (input) variables.

In particular, the earlier function F(A,B,C) = ∑ m(1,3,5,6)

can be implemented using a 4-to-1 multiplexer (rather than an 8-to-1 multiplexer).

Page 84: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 84

Using Smaller Multiplexers

mux

A B C

01234567

11010010

Fmux

A B

0

1

2

3

1C0C'

F

Let’s look at this example:F(A,B,C) = Σ m(0,1,3,6) = A’B’C’ + A’B’C + A’BC + ABC’

A’B’

Note: Two of the variables, A, B, are applied as selection lines of the multiplexer, while the inputs of the multiplexer contain 1, C, 0 and C'.

Page 85: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 85

Using Smaller Multiplexers

Procedure1) Express boolean function in “sum-of-minterms” form.

e.g. F(A,B,C)= Σ m(0,1,3,6)2) Reserve one variable (in our example, we take the least

significant one) for input lines of multiplexer, and use the rest for selection lines.e.g. C is for input lines, A and B for selection lines.

Page 86: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 86

Using Smaller Multiplexers

3) Draw the truth table for function, but grouping inputs by selection line values, and then determine multiplexer inputs by comparing input line (C) and function (F) for corresponding selection line values.

A B C F MuxInput

0 0 0 10 0 1 1 1

0 1 0 00 1 1 1 C

1 0 0 01 0 1 0 0

1 1 0 11 1 1 0 C’

mux

A B

0

1

2

3

1

0FC

Page 87: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 87

Using Smaller Multiplexers

Alternative: What if we use A for input lines, and B, C for selector lines?

A B C F MuxInput

0 0 0 10 0 1 1 1

0 1 0 00 1 1 1 C

1 0 0 01 0 1 0 0

1 1 0 11 1 1 0 C’

A B C F0 0 0 10 0 1 10 1 0 00 1 1 11 0 0 01 0 1 01 1 0 11 1 1 0

A’ (when BC = 00)

A’ (when BC = 01)

A (when BC = 10)

A’ (when BC = 11)mux

B C

0

1

2

3

A

F

Page 88: Topic 6_MSI

FLB 20203 DIGITAL SYSTEMS Combinational Circuits: MSI Components 88

Using Smaller Multiplexers

Example: Implement using a 74151A the function:f(x1,x2,x3,x4) = ∑ m(0,1,2,3,4,9,13,14,15)