Forum Discussion
Altera_Forum
Honored Contributor
10 years agoDifference in floating point and fixed point arithmetic in vhdl.
Hiii... I want to know the difference between floating point and fixed point arithmetic.I searched it on google but I didnt get a clear idea when to use which type of arithematic. Can any one pl...
Altera_Forum
Honored Contributor
10 years agoFixed point is really just integer arithmetic with an offset (its not just similar - it is completely identical). It uses 2s compliment for signed arithmetic. https://en.wikipedia.org/wiki/two%27s_complement
Floating point uses a different number format complety. It uses a sign bit, and exponent and a mantissa. https://en.wikipedia.org/wiki/floating_point Fixed point has a fixed range with fixed precision based on the number of bits. Floating has a fixed range with floating precision, bit width is always fixed. Floating point is computationally expensive, uses a lot of resources and has a high latency. Fixed point is cheap, few resources and low latency.