Altera_Forum
Honored Contributor
9 years agoConfused over division by shifting
Hi,
Suppose I have an array x whose 1st element x1 is a logic vector of length 8 and the second element x2 is also a logic vector of length 8 making the array x a logic vector of total length equals to 16. I have another array y whose 1st element y1 is a logic vector of length 16 and the second element y2 is also a logic vector of length 16 making the array y a logic vector of total length equals to 32. I want to perform a division of 2 by shifting the bits (15 downto 8) from y2 and storing it into x2. Will this give a division of 2 as I expected ? Can anyone help me clear this confusion of mine ? Please note that I'm not willing to use the normal division as I need to do more processing after this step. Thanks,