If statement - checking only the first 5 MSB's.

KeithRB:
The shift might not be portable depending on whether the variable is signed or un-signed.

You're right. I didn't think of that.