You need to use the 24 bits input data in the start of the 32 bit data and fill the rest with 0.
Its like having a 10 bit a/d converter, when you want 8 bits you read only the 8 MSB bits and you discard the 2 LSB, if you use only the 8 LSB then you max reading will be 1/4 of actual max.
In your case if you copy your 24 bit data to the LSB and fill the first 8 bits with 0 then you can only have a max value of 1/256 of the max 32 bit value.
Like the above example consider a 32 bit A/D converter, when you want 24 bit resolution you need to read the 24 MSB and discard the last 8 bits, so this is exactly the bits you need to fill with your 24bit input.
Alex
---------- Post added at 14:24 ---------- Previous post was at 14:09 ----------
You can also do oversampling but the resulting sampling frequency will be very low.
For 25 bits resolution you need to add 4 24bit samples and shift right 1
For 26 bits resolution you need to add 16 24bit samples and shift right 2
For 27 bits resolution you need to add 64 24bit samples and shift right 3
For 28 bits resolution you need to add 256 24bit samples and shift right 4
For 29 bits resolution you need to add 1024 24bit samples and shift right 5
For 30 bits resolution you need to add 4096 24bit samples and shift right 6
For 31 bits resolution you need to add 16384 24bit samples and shift right 7
For 32 bits resolution you need to add 65536 24bit samples and shift right 8
so the sampling frequency for the 32 bit will be 50000000/65536=762 Hz
Alex
---------- Post added at 16:05 ---------- Previous post was at 14:24 ----------
One more note, if you are using the absolute value of the 24bit data (for example a counter result) then you need to copy the value to the lower bits of the 32 bits data so that the value is exactly the same.
On the other hand if you want to transfer your measurement as a percentage of the max value from the 24bit domain to the 32 bit domain then you copy the data to the upper 24 bits.
Alex