Re: Why fixed point ?
- From: "Feng Ouyang" <fengouyang@xxxxxxxxx>
- Date: Sat, 11 Mar 2006 22:18:58 GMT
Well, in principle I agree with you. If we treat all numbers as integers,
the intermediate and final results could be very big (in general, the
product of two 16 bit integers can be 32 bits). To keep these results
within the range that a platform supports, we need to scale the data are
various stages of the computation (and thus the shifts that you observed).
The fixed point is just an artificial definition that we use to keep track
on the scaling. We don't have to use the notion of fixed point. But it is
well accepted in the DSP circle.
On the other hand, many common hardware multipliers work with a fixed point
definition. For example, let's say a multiplier takes two 16 bit integers
and outputs one 16 bit result. And it is defined as "1.15". This means
that if we view everything as fixed point 1.15 format, then the output is
c=a*b, where a, b are input. If, instead, we view everything as integers,
then the output of of the multiplier is c=a*b/(2^15). So, you see, the
given fixed point format tells us what the implicit scaling is. We cannot
ignore such specification, even if we prefer to work in integers.
Hope this helps.
"steve" <bungalow_steve@xxxxxxxxx> wrote in message
I suspect that ,so far, no one understood your question.
As far as fixed vs integer, its a matter of convention, there is no
execution advantage to either one. Some people see advantages to one or
the other only because that is what they normally use.
The one example you said you did that shown the fixed point required
one more shift then the integer, well, that is only because you
expected the result in a certain format, I could say that I expected
that pre shifted result from the beginning, and therefore I wouldn't
need the shift because I expected the result in a different scaling
(point position) then you did. See the problem?
One's definition of "neutral" point position is in the eyes of the
beholder (well, maybe, coder). If you gave me a big fat algorithm to
code, I could code it in either fixed or integer math that would
execute in exactly the same time and give an answer with exactly the
- Prev by Date: Re: Why fixed point ?
- Next by Date: Re: Online signal processing books
- Previous by thread: Re: Why fixed point ?
- Next by thread: Re: Why fixed point ?