posted 19 years ago
Hi Amit,
To make sure that the value always falls in 0-31(inclusive) range,the compiler masks it with 0x1F,the explanation has been provided by Ariel,I am showin you the example in detail:
I have thought of a short-cut method,but i dont knw how far it would work.
For eg.
if it's x >> -3,it changes to x >> 29 (i.e 32-3).
For,x << -4,it changes to x << 28 (i.e 32 - 4).
lolz..hopes that helps!!!
SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)