Bit Shuffler - use a MUX?

hello86

Joined Mar 4, 2008
1
Hello, I have a homework question that I have no idea where to start with.
Any advice on how to take apart the question would be useful.

Here it is:

A shorthand notion for representing a group of wires is: A[3:0] which basically means its A3 A2 A1 A0, 4 bits.

Design a circuit that conforms to the following:

Input: A[3:0] - 4 bit input
S - 1 bit input

Output: D[3:0] - 4 bit output

Operation specifics:

If (S=1) then D[3:0] = A[3:0] --> D = A, D = A etc

If (S=0) then D[3:0] = A[2:0], 0 --> D = A, D = A, .. D = 0.

I mean I thought I could use a multiplexer where S is the select button. So, essentially you select the inputs to be equal to the outputs when the Select value is 1.

When select is 0, you shift everything?

Thank you!

Dave

Joined Nov 17, 2003
6,960
Sounds like you want a PIPO shift register (ref. http://www.allaboutcircuits.com/vol_4/chpt_12/5.html), in your case S would be the mode operation.

This shift register uses parallel in and out, however you could look at serial input and/or output. The net effect of the shift register is the same, it just in the implementation.

Dave