If x is a singed char. Does x >> n still the same as the integer division of 2^n and x << n same as the multiplication of 2^n?
Why does it work/not work?
How does arithmetic shift work?
Let's say if I have a signed char of 1001 in binary, -1 in decimal.
With an arithmetic right shift by 1 become 1100? Would it means -4 in decimal? so the multiplication we mentioned above won't work even for arithmetic shift.