I'm reading a section on fixed point numbers in DSP computer-based approach by Mitra. It mentions that in practice fixed point numbers are stored as either fractions or integers. How can this be done?
hi
in case of fixed point implementation of the floating pt values...the number u want to convert is first normalised i.e. if u remember the elementry maths on logarithms is converting into a 1 followed by the decimal point and then followed up by the fraction but here we further reduce it to below 1 i.e. -1<N<1(in case of unsigned 0<N<1) ... in this case the dividing factor is 4 hence we need 3 bits before the pt to represent the division factor and then the next number of bits depends on the precision or bit-length of the data type.. hence in fixed pt dsp we use Q format here for 2 byte precision the Q format is Q3.12
after this the fraction i.e. 3.1415/4 is multiplied with the precision value ie number of bits representing the fraction part... here 12 bits so
fixed pt value = 3.1415/4 *(2^12)
Hi,
What's confusing me is that DSP books (Proakis, Mitra,..) suggest the use of fractional fixed point numbers (I.e Q0.15) and they don't mention anything about these various formats or if using some format is better than the other. I'd appreciate it if someone would help me end this confusion.