#include<stdio.h>
int main()
{
printf("%x\n", -1>>1);
return 0;
}
Output:ffff
My Question is, we are shifting right one time , then we must get the output as 7fff
1111 1111 1111 1111--->ffff
0111 1111 1111 1111--->7fff
But why am I getting the output as ffff?