resultUnsigned |= ((resultUnsigned & maskMsb) >> (bits - 1)) * higherBitsMask; } return asint(resultUnsigned); }