Bit Shuffler - use a MUX?

Discussion in 'Homework Help' started by hello86, Mar 4, 2008.

  1. hello86

    Thread Starter New Member

    Mar 4, 2008
    1
    0
    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[3] = A[3], D[2] = A[2] etc

    If (S=0) then D[3:0] = A[2:0], 0 --> D[3] = A[2], D[2] = A[1], .. D[0] = 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!
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    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
     
Loading...