# Re: Why fixed point ?

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.

Feng

"steve" <bungalow_steve@xxxxxxxxx> wrote in message
news:1142101924.804870.221660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
same precision.

.

## Relevant Pages

• Re: linear interpolation / Assembler / ATMega32
... > (arithmetic shift right, ASR). ... > There is still one more problem: rounding. ... > If you want to use this rounding algorithm with the sign branching ... > If you do not have a hardware multiplier, ...
(comp.arch.embedded)
• Re: Convert date to serial number
... What's the numberformat for that cell that gets the value? ... MsgBox "datecode with shift is " & DateAndShift ... the MsgBox gives the date and shift code in the format I ... "Dave Peterson" wrote: ...
(microsoft.public.excel.programming)
• RE: How do I convert date and time into shift worked?
... Dan: The table in my previous posting had an error. ... The table above have 4 columns starting in cell A1. ... Column C - The start ime of the shift formated in time format ...
(microsoft.public.excel.misc)
• Re: Time formatting & calculating
... Excel can work happily with time, sum it ... (just make sure the sum format is:mm), sort it, etc., so I wouldn't ... I still can't get this to give me the number of hours worked on a holiday during or outside the regular shift to indicate which reimbursement is earned. ... I do not know how to enter the references or have something formatted incorrectly. ...
(microsoft.public.excel)
• Re: Why fixed point ?
... Did I use a multiplier? ... MSB or after LSB position of comma, no correction shift is ... The answer hasn't changed: To preserve precision. ... the choice of b in interpreting the scaling Ais arbitrary. ...
(comp.dsp)