>On Mon, 26 Oct 2009 10:53:23 -0400, Jerry Avins wrote:
>
>> thunder wrote:
>>> 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.
>>
>> Then there is overflow, just as two Q15.0 integers and getting a Q16.0
>> sum. (Remember the sign bit.)
>>
>>> Qs: How do I transform c into d, where d is a unsigned Q7.9 result ??
>>
>> You can't. Count the bits. (Remember the sign bit.)
>>
>You can't on a 16-bit machine, but if you're working in an FPGA or custo
>logic a 17-bit type is no problem.
True, but he specifically said Q7.9, and 7 + 9 was 16 the last time
checked. :-)
>
>> ...
>>
>>> QS; Can anyone recommend a good book on Fixed Point and Floatin
point
>>> arithmetic ?
>>
>> http://www.digitalsignallabs.com/fp.pdf
>>
>> Jerry
Steve