Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- Assuming I have a 16 bit fixed point number that needs to be squared, how should this be implemented? The number format is Q2.14. Squaring it shall produce a result that is 32 bits instead and seems to have format of Q4.28 (right?). Now since I am squaring this fixed point number, I shall have to shift it right to become Q4.14 and then feed it back in. But how can I feed in a result of format Q4.14 when the input is of format Q2.14. What is wrong in my understanding? --- Quote End --- just multiply 16 bits x 16 bits = 32 bits If you are asked to also scale down then truncate LSBs