This ought to work, oughtn't it? (is that even a word?)

Code:
y = your_variable;
y <<= 31;
y >>= 31;