Convert decimal to Q5.27
You can't really use Q5.27 in 32-bit storage. You need at least one bit for the sign, so I guess you'd call it Q4.27 since the sign bit is implicit.  The conversion from float is exactly the same as for Q0.27 except you can convert any numbers between -16 to just less than 16.

int(0.9 * 2^27)  = 0x07333333
int(-0.9 * 2^27) = 0xf8cccccd


As you can see you need the sign bit to represent a negative number.

-16 and 16 arise from:

0x7fffffff / (2^27) = 15.9999999925  (biggest +ve number)
0x80000000 / (2^27) = -16            (biggest -ve number)