use sign-extension in right shifts