# [sdiy] Best book /resource for fixed point math??

Veronica Merryfield veronica at merryfield.ca
Thu Sep 12 21:16:52 CEST 2013

```In the early days of the TMS320, TI had a very good book ok working with fixed point math since at that stage the TMS320 was mostly a fixed point math DSP.

Ti have maintained a lot of their older data books and app notes in digital format as part of their website's educational section.

Conceptually it is not that difficult - break a sized quantity into a number of sections that have meaning, so perhaps a 32 bit word would be 16 bit int and 16 bit fraction. I have used this kind of method based on having a DAC to output data. Hook it up to the top bits of a buss and then use the full data width to do all the work with only the relevant data being outputted to the DAC.

With limited CPU resources (say no FPU), doing things this was can be quick but the int/fraction break down has to be architected for the system correctly. Having down that, most of the math is pretty simple based on those numbers of bits. The difficultly is moving between number systems (putting an int into the format say), but this can be done with shifts for variable data and constants can be setup appropriately.

As I recall, TI had a lot of interest DSP stuff done in fixed point math (FFT, correlation etc) and although the code was for the TMS320, they explained it well such that it could be implemented for other devices.

Veronica

On 2013-09-12, at 7:56 AM, Dan Snazelle <subjectivity at hotmail.com> wrote:

> In a few different wavetable synth programs (for avr) that I have been studying, I keep finding references to  fixed point math
>
> Variables like
>
> Q16n16
> Q0n31
> Q1n15 etc
> And functions for seperating the "fractional part" of a number, etc.
>
>
> Im wondering which book , video, etc
> Might be best for really coming to terms with understanding fixed point/floating point so that I can understand programs and so my own programs can improve.
>
> I know it would be useful as I have read that the AVR can use  the help with math it can get (just like me)
>
> Thanks!
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>

```