If we use bitwise-shift to shift all bits to the right by 2, x is 0:
00000000000000000000000000000000
If we then do a bitwise leftshift on x by 30, do we end up with:
11000000000000000000000000000000
or
00000000000000000000000000000000
In other words, when we perform right shift which clips away the least most significant bits, and then do a left shift, is it possible for those bits to reappear?
Note that 00000000000000000000000000000000 is equivalent to 0; and bit shifting any number by x to the left means number * 2x and bit shifting any number by x to the right means number / 2x. So in any case, bitshifting zero in any direction will always result in zero
In other words, when we perform right shift which clips away the least most significant bits, and then do a left shift, is it possible for those bits to reappear?