hi all,
can anyone share the material or algorithm for converting a flaoting point value in C to a fixed point Q12 - format, as we do in a DSP processor.
Q12 format for fixed-point numbers means 12 fractional bits 3 integer bits and 1 sign bit. Say you have number x as floating-point (within +_1.0 range), xq12 is given as;