cancel
Showing results for 
Search instead for 
Did you mean: 

q15 fixed point 1.15 9.7 etc

hashtala
Associate II

Hello

I was wondering about nubering in q15 fixed point

I am guessing that in 1.15, 1 (msb) is responsible for sign and 15 bits are for magnitude

(I could be wrong)

However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?

1 ACCEPTED SOLUTION

Accepted Solutions

>>However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?

Yes,

float f = (float)q / 128.0f;

float f = (float)q * (1.0f / 128.0f);

Figure range +255.992 to -256.0

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

>>However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?

Yes,

float f = (float)q / 128.0f;

float f = (float)q * (1.0f / 128.0f);

Figure range +255.992 to -256.0

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

will that conversion actually work ?

I am now testing CMSIS rfft and generated int16 sine

now I am passing this int 16 sine to rfft_q15 because sign bit is still msb and that should more or less work

the I am getting back (I believe ) 9.7 which I try to covert to normal int but does not behave as expected for some reasons