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

L

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

Welcome to EDABoard.com

Sponsor

Back
Top