Docsity

Understanding Multiplexers: 2n-to-1 Signal Routers for Arbitrary Functions, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
Multiplexers
•Today, we’ll study multiplexers, which are just as commonly used as the
decoders we presented last time. Again,
–These serve as examples for circuit analysis and modular design.
–Multiplexers can implement arbitrary functions.
–We will actually put these circuits to good use in later weeks, as
building blocks for more complex designs.
Multiplexers 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Understanding Multiplexers: 2n-to-1 Signal Routers for Arbitrary Functions and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Multiplexers

•^ Today, we’ll study multiplexers, which are just as commonly used as thedecoders we presented last time. Again,

–^ These serve as examples for circuit analysis and modular design. –^ Multiplexers can implement arbitrary functions. –^ We will actually put these circuits to good use in later weeks, asbuilding blocks for more complex designs.

Multiplexers

Multiplexers

•^ A

n 2 -to-1 multiplexer

sends one of 2

n^ input lines to a single output line.

–^ A multiplexer has two sets of

inputs

n • 2

data input

lines

•^ n^ select

lines, to pick one of the 2

n^ data inputs

–^ The mux

output

is a single bit, which is one of the 2

n^ data inputs.

•^ The simplest example is a 2-to-1 mux:

Q = S’ D0 + S D1 Multiplexers

•^ The select bit S controls which of the data bits D0-D1 is chosen:

–^ If S=0, then D0 is the output (Q=D0). –^ If S=1, then D1 is the output (Q=D1).

Q = S’ D0 + S D

A 4-to-1 multiplexer

•^ Here is a block diagram and abbreviated truth table for a 4-to-1 mux. •^ Be careful! In LogicWorks the multiplexer has an

active-low

EN input

signal. When EN’ = 1, the mux always outputs 1.

EN’^

S^

S^

Q

D

D

D

Multiplexers

D

D

x^

x^

Q = S1’ S0’ D0 + S1’ S0 D1 + S1 S0’ D2 + S1 S0 D

Implementing functions with multiplexers

•^ Muxes can be used to implement arbitrary functions. •^ One way to implement a function of

n^ variables is to use an

n-to-

mux:

–^ For each minterm m

of the function, connect 1 to mux data input Di.i

Each data input corresponds to one row of the truth table. – Connect the function’s input variables to the mux select inputs.These are used to indicate a particular input combination.

•^ For example, let’s look at

f(x,y,z) =

Σm(1,2,6,7)

x^ y

z^

f

Multiplexers

x^ y

z^

f 0 0

Example: multiplexer-based adder

•^ Let’s implement the adder carry function, C(X,Y,Z), with muxes. •^ There are three inputs, so we’ll need a 4-to-1 mux. •^ The basic setup is to connect two of the input variables (usually thefirst two in the truth table) to the mux select inputs.

X^ Y

Z^

C

Multiplexers

With S1=X and S0=Y, thenQ=X’Y’D0 + X’YD1 + XY’D2 + XYD3Equation for the multiplexer

Multiplexer-based carry

•^ We can set the multiplexer data inputs D0-D3, by fixing X and Y andfinding equations for C in terms of just Z.

X^ Y

Z^

C

When XY=00, C=0 When XY=01, C=Z 0

Multiplexers

C = X’ Y’ D0 + X’ Y D1 + X Y’ D2 + X Y D3= X’ Y’ 0

+ X’ Y Z

+ X Y’ Z

+ X Y 1

= X’ Y Z

+ X Y’ Z

+ XY

=^ Σm(3,5,6,7)

When XY=10, C=Z When XY=11, C=

Dual multiplexer-based full adder

•^ We need

two^

separate 4-to-1 muxes: one for C and one for S.

•^ But sometimes it’s convenient to think about the adder output as beinga single 2-bit number, instead of as two separate functions. •^ A

dual 4-to-1 mux

gives the illusion of 2-bit data inputs and outputs.

–^ It’s really just two 4-to-1 muxes connected together. –^ In LogicWorks, it’s called a “Mux-4x2 T.S.”

Multiplexers

Dual muxes in more detail

•^ You can make a dual 4-to-1 mux byconnecting two 4-to-1 muxes. (“Dual”means “two-bit values.”) •^ LogicWorks labels input bits

xDy

, which

means “the xth bit of data input y.” • In the diagram on the right, we’re usingS1-S0 to choose one of the following pairs

of inputs: – 2D3 1D3, when S1 S0 = 11

Multiplexers

–^ 2D3 1D3, when S1 S0 = 11 –^ 2D2 1D2, when S1 S0 = 10 –^ 2D1 1D1, when S1 S0 = 01 –^ 2D0 1D0, when S1 S0 = 00 You can see how 8-way multiplexer (k-to-1) can beused to select from a set of (k) 8-bit numbers

Practice

•^ Implement F(x,y,z) = ∑m(1,3,4,5) using a decoder.

Multiplexers

Practice

•^ Implement F(x,y,z) = ∑m(1,3,4,5) using a multiplexer.

Multiplexers