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. Advertisements

  2. lokesh kumar

    goouse99 Guest

    Am Donnerstag, 11. Juli 2013 18:36:21 UTC+2 schrieb lokesh kumar:
    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
     
    goouse99, Jul 12, 2013
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.