When shifting left, the 0x8000 value will shift the bit off the end and wind up equalling zero, so you can check for 0 instead of > 0x8000.