Skip to main content
hashtala
Associate III
August 27, 2020
Solved

q15 fixed point 1.15 9.7 etc

  • August 27, 2020
  • 2 replies
  • 1169 views

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 ?

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    >>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

    2 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    August 27, 2020

    >>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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    hashtala
    hashtalaAuthor
    Associate III
    August 28, 2020

    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