fastest way to right shift an array of 4 bytes

Ah, endianness. I forgot about that. Between sign and endianness, I expect we cam explain all of the original poster's problems.

{0x2, 0x5, 0x10, 0x80} cast to a long would give you 0x80100502, and right-shifting as signed would give you something like
0xC0080281 or {0x81, 0x2, 0x8, 0xc0}