0
$\begingroup$

So I'm performing some operations with fractional numbers in a 16-bit FIXED-POINT processor.

I have to multiply the numbers $\ x=-6.35$, represented in $\ Q_{11}$, and $\ y=-0.1$, represented in $\ Q_{14}$.

First I represent the numbers in the respective notation in binary. The MSB is the sign bit.

So $\ x=11001.10100110011$ and $\ y=11.11100110011001$. I know the binary point is just in our mind and the processor treats this numbers as integers.

Ok then we multiply the numbers and get $\ x*y=11001000000100010011111001111011$. We elimnate the repeated sign bit and save the 16 MSB and represent the result in the appropriate format $\ Q_{10}$: $\ x*y=100100.0000100010$. This number corresponds to $\ - 27.966796875$. But this doesn't make any sense, the result should be $\ 0.635$.

What is going on here? Why is the result different? Am I missing something?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.