invincible wrote:
Regarding 16bit signed integer ,
its working out fine. Thanks a lot . But I have similiar problem with 32 bit
signed integer. Kindly help me out
I have used
((s32Val << 24) | (s32Val >> 24) | ((s32Val >> 8)& 65280)
| ((s32Val << 8)& 16711680))
But it is not working with 32 bit signed integer
The right shift by 24 (second expression) should be "anded" with 255.
Since you say "s32Val", I'm assuming you're signed, so the right-shift
by 24 gets sign-extended.
Incidentally, I'd recommend using hex constants to make it more obvious
what you're doing, instead of the decimal ones.
i.e.: 65280 = 0xff00, 16711680 = 0xff0000, 255 = 0xff