# 4 way multiplexer?

Status
Not open for further replies.

#### Terabyte

##### New Member
Hey,
Just revising for a hardware exam, looking over some past papers and a few questions I can't answer

How can I make a four way multiplexer using three 2 input multiplexers

I thought I would do something like this

Code:
A------|1|___| |
B------|_|   |2|___| |
C------------|_|   |3|-------O
D------------------| |
but that leaves me with 3 Selector lines, when really I only want 2...
Can anybody suggest anything?

Also on a side note, I've been asked to "show how four four-way multiplxeres can be used to build a four bit shifer with inputs I3,I2,I1 and I0 and outputs O3,O2,O1 and O0"
Can it be done JUST with four four-way multiplexers.. or do you need to use D-Q flip flops as well.. I always thought any shifter required D-Q flip flops, yet the question doesn't mention them.

Thanks for any help

#### on1aag

##### New Member
Hi Terabyte,

First question see below.

Second question: If you are simulating a shift register with
multiplexers you're dealing with multiplexers, not with shift
registers, no D-ff's. If you would use D-ff's you would already
have a shift register.

If you have problems with this sort of questions you've got
something coming at you !

on1aag.

#### Attachments

• 6.6 KB Views: 470

#### Terabyte

##### New Member
Ok thanks very much for the picture, perfect thanks!

But i'm still not clear about the shift register,
I thought a 4 bit shift register with 4 functions to perform required 4 dq flip flops, and each one preceded by 1 of the 4 multiplexers.. with each of those 4 inputs being fed from different points in the circuit (depending on the functionality).
I mean, otherwise where is the common clock?
Sorry I should have mentioned that there were 4 functions required (if it made a difference):

00: No change
01: Artithmetic shift right
10: Shift Left Carry Out
11: Shift Left Carry In

Thanks for any clarification

#### tkbits

##### Member
Implementing a shift depends on whether you are updating storage (registers) or whether you view a shift as a math function.

If you view a shift as a math function, it only requires connecting or renaming.

Example:

y[0] = 0
y[1] = x[0]
y[2] = x[1]
y[3] = x[2]

If x[3:0] is 1101, then y[3:0] will be 1010, which is x shifted left by one bit.

Status
Not open for further replies.