06-07-2018 03:04 AM
I have a problem:
I need to add two floating point numbers that are stored in a vector (random size f.e. 0-7). The result of adding is also stored in a vector. Adding must be done by indexes that means if I have a number that is stored in a vector A <= 1,765 and the second number stored B <= 14,123 adding goes as follow C  = A  + B . However, before adding, numbers that are stored in a vector must be filled in with 0 that coma is aligned. It would look like this A (001.7650) and B (014.1230).
Can you please help me, I'm struggling with this for some time :/ Thank you in advance. I'm working in ISE on Spartan 3
06-08-2018 05:53 AM
I thought about a decimal floating point, however, as I read some materials it would be easier to do binary coded decimal floating point. I didn't try out any code yet because I don't know how to even the coma in two digits. That is where I'm currently in. I will try to write a code later today and I will upload it what I have achieved, but I would be very very grateful for any tips, sample codes etc.