Can anyone help me to design a n bit input and n bit output shift register

Discussion in 'VHDL' started by lokesh kumar, Jul 11, 2013.

  1. lokesh kumar

    lokesh kumar Guest

    Hi,

    I need a help to understand how the shift register works.

    Suppose A and B are the 5-bit numbers.

    A= 10101
    B=11001
    1. B(i) = 1 is the MSB 1st bit of B input
    2. B(i) = 1 is the MSB 2nd bit of B input
    3. B(i) = 0 is the MSB 3rdst bit of B input
    4. B(i) = 0 is the MSB 4thd bit of B input
    5. B(i) = 1 is the MSB 5thbit of B input

    Basically the 1st MSB of B is multiplied with the 5-bit number A first. Then the 2nd MSB of B is multiplied with A and so on.

    So I want to know how can I insert the values of B in this case. Can anyone please help me out with the VHDL code?

    Many thanks!
     
    lokesh kumar, Jul 11, 2013
    #1
    1. Advertising

  2. lokesh kumar

    Guest

    Am Donnerstag, 11. Juli 2013 18:36:21 UTC+2 schrieb lokesh kumar:
    > Hi,
    >
    >
    >
    > I need a help to understand how the shift register works.
    >
    >
    >
    > Suppose A and B are the 5-bit numbers.
    >
    >
    >
    > A= 10101
    >
    > B=11001
    >
    > 1. B(i) = 1 is the MSB 1st bit of B input
    >
    > 2. B(i) = 1 is the MSB 2nd bit of B input
    >
    > 3. B(i) = 0 is the MSB 3rdst bit of B input
    >
    > 4. B(i) = 0 is the MSB 4thd bit of B input
    >
    > 5. B(i) = 1 is the MSB 5thbit of B input
    >
    >
    >
    > Basically the 1st MSB of B is multiplied with the 5-bit number A first. Then the 2nd MSB of B is multiplied with A and so on.
    >
    >
    >
    > So I want to know how can I insert the values of B in this case. Can anyone please help me out with the VHDL code?
    >
    >
    >
    > Many thanks!


    Hi lokesh,
    you are asking the wrong question.
    Your real question is :
    How does binary multiplikation work.
    Answer,
    Just the same as decimal multiplication,
    only that you have just to deal with '0' and '1' which make things simpler.

    Remember how you learned to do multiplication in elementary school using pen and paper? Now do the same with binary numbers and you will see what the shifting means and why you have forgotten to mention the adding of the shifted values. ;-)

    Have a nice synthesis
    Eilert
     
    , Jul 12, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roberto Gallo

    Shift - byte[] buf shift

    Roberto Gallo, Jan 27, 2004, in forum: Java
    Replies:
    3
    Views:
    2,076
    Thomas Schodt
    Jan 27, 2004
  2. Wenjie
    Replies:
    3
    Views:
    1,041
    Ron Samuel Klatchko
    Jul 11, 2003
  3. Christian Vallant

    8 bit into 256 bit shift register

    Christian Vallant, May 23, 2006, in forum: VHDL
    Replies:
    8
    Views:
    3,966
    Mike Treseler
    May 24, 2006
  4. Santosh Nayak

    Left Shift / Right Shift Operators

    Santosh Nayak, Nov 30, 2006, in forum: C Programming
    Replies:
    16
    Views:
    1,460
    CBFalconer
    Nov 30, 2006
  5. Sanny
    Replies:
    38
    Views:
    3,432
    Thomas Richter
    Apr 29, 2011
Loading...

Share This Page