2 bit shift right

Discussion in 'Homework Help' started by aloishis89, Mar 24, 2009.

  1. aloishis89

    Thread Starter New Member

    Mar 24, 2009
    2
    0
    I am working on a 4 bit bidirectional shift register for some homework. It needs to have several features, one of which is the ability to do a 2 bit arithmetic shift right. I know how to do this with 1 bit, but how do you do 2? Can someone give me an example of what this would look like with numbers and then how you would implement that? By the way, the circuit we are dealing with consists roughly of 4 mux's with their outputs to 4 flip flops. If you need more details, let me know.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    If you can shift right by one bit, just do it again. That makes it two bits.
     
  3. aloishis89

    Thread Starter New Member

    Mar 24, 2009
    2
    0
    But wouldn't that take 2 clock cycles?
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Probably. That might be one of those details -
    - you mention. What do clock cycles have to do with the original post?
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    Each input has a 2:1 mux. One selection is the adjacent FF, and the other selection is the FF two stages away. It is similar to how a barrel shifter is built. You do have to be careful to correctly propagate the sign bit.
     
Loading...