05-14-2012 11:56 AM
Hi,How can I convert the decimal fraction to the mantissa format (IEEE). The MegaWizard function demands the decimal number in binary form (3 = 0011, for example). So how can I convert 0.3 to mantissa without multipling on 10 or 100 etc? Other way, if i starting to multiply so i don't net to use mantissa, am i wright? My final target is to apply the next math function y = 0.201x + 7.899 I supplying the "x" values. Can anybody help me with this question, please?
05-14-2012 12:46 PM
the input is an integer, which will always be binary. But in fixed point, the integer and fractional parts are just normal integers offset by 2^n. Have a read up on fixed point number formats.Are you sure you want to use flooating point?
05-15-2012 06:46 AM
05-15-2012 08:36 AM
--- Quote Start --- All integers are in 2s compliment - there is no decimal representation in any electronics. --- Quote End --- Not entirely true! Some old processors (eg the Singer 'System 10' and its descendent the ICL 'System 25') used BCD arithmetic and addressing.