Opel_Corsa
Member level 1
I have 3 8-bit std_logic_vectors A, B, C. If I include the unsigned.all library, would the code correctly perform the following?:
Also for multiplication, lets say I have a 16-bit vector called D. Would the following do what I want?:
Thanks for any help.
Code:
C <= A + B;
C <= A - B;
C <= A and B; -- bitwise addition
Code:
D <= A * B;
C <= D(7 downto 0); -- only interested in the lower 8-bits since C can't hold anything larger