View Single Post
  #5 (permalink)  
Old 10-26-2009, 06:25 PM
Randy Yates
Guest
 
Posts: n/a
Default Re: Fixed point arithmetic

thunder <[email protected]> writes:

> Hi
>
> I have a question regarding Fixed point Arithmetic addition.
>
> For example, i have two fixed point numbers:
>
> a = unsigned Q7.8 format (7-bit integer, 8 bit factional).
> b = unsigned Q7.8 format ( " " ).
>
> Now a + b = c, where c is an unsigned Q8.8 result.
>
> Qs: How do I transform c into d, where d is a unsigned Q7.9 result ??


There is no way in general to do this conversion and avoid some kind of
nonlinear effect since the range of Q7.9 is smaller than Q8.8. The most
obvious method would be to saturate the Q8.8 result to Q7.9.

It would be good to know the reason why you're trying to rescale in this
manner - there may be a better way to do things from a higher level
point-of-view.
--
Randy Yates % "The dreamer, the unwoken fool -
Digital Signal Labs % in dreams, no pain will kiss the brow..."
mailto://[email protected] %
http://www.digitalsignallabs.com % 'Eldorado Overture', *Eldorado*, ELO
Reply With Quote