I am implementing an IIR controller in dsPIC 33EP (16-bit, fixed-point, two's complement, wrap-around, 40-bit accumulator, 32-bit multiply, 12-bit ADC) and I am using cascaded, Direct Form I second order sections (ordering up).

I am using Q15 (fractionals), but my coefficients are within the range +/-1. The question is: If a coefficient is exactly +1, will it fit in Q15?

The confusion is due to the fact that Q15 allows values from -1 to 0.99999999906 only. So I am afraid it will be quantized to 0 or -1 in 2's complement wrap-around.

I would very much appreciate any help.



1 Answer 1


There's an old trick you can use:

$$1\cdot x=x$$

So you don't need to multiply with a factor that equals $1$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.