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

L

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!
 
G

goouse99

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top