The thing is as far as I know a right shift of an signed value is not defined and the behavior is platform/compiler dependent. Some will fill in ones which would be what we want because the sign would still be ok. But there are compilers which would fill in zeros.