c
only has one shift right operator >>
but that is only an arithmetic shift when the number is a signed value type.
main()
{
int x = -2;
printf("%d\n",x>>1);
printf("%d\n",((unsigned int)x)>>1);
return 0;
}
So you could cast to unsigned if you need to ensure non-arithmetic shift.