Convert 4.11 (integer.fraction) to float32
You are overthinking this with all that decomposing of the value into individual bits. No need to split the fractional part from the integer part either.

Let's say that your Q4.11 value represents the number
1010.011110010112 (10.47412109375 in decimal)
and is stored as
1010011110010112
in memory.


The first step is to directly cast the raw integer to 32-bit floating point, disregarding the decimal point completely:

1010011110010112 → 010001101010011110010110000000002    

which means 1.010011110010112 * 214, the floating point representation of the value of the original integer.  
Next divide the floating point value by two to the power of the number of fractional bits in the fixed point value (211 in your case)  

(1.010011110010112 * 214) / 211 = 1.010011110010112 * 23  

which is just the floating point representation of 1010.01111001011. Done.  




To do this in C / C++, you only need one line of code:  

float val = (float)src_reg / pow(2, 11);  


Or even better  

float val = (float)src_reg / (1UL &lt;&lt; 11);  


which avoids linking to the math functions unnecessarily by replacing exponentiation with left shifts of 1.