I don't think your expression always returns min value of signed int.
if all values in data
array were zero, it would return zero.
I also don't think this would result in setting all bits to ones.
Following code (Java) where I use Integer.MAX_VALUE
:
int max = Integer.MAX_VALUE; //(2^31 - 1) - all bits apart from the sign are 1
System.out.print(Integer.toBinaryString(((max & 0x00000001) << 31) | ((max&0x000000FF)<<12) | ((max&0x000000FF)<<4) | ((max&0x000000FF)>>>4)));
returns:
10000000000011111111111111111111
using provided values:
System.out.print(Integer.toBinaryString(
((0b00101001 & 0x00000001) << 31) |
((0b11111111 & 0x000000FF) << 12) |
((0b11111001 & 0x000000FF) << 4) |
((0b11001111 & 0x000000FF ) >>> 4))
);
returns:
10000000000011111111111110011100