Ho can I check if the most (or least) significant bit of a value is set?