This is an excerpt from the article on wikipedia https://en.wikipedia.org/wiki/Arithmetic_shift:
Shifting right by n bits on a two's complement signed binary number has the effect of dividing it by 2^n, but it always rounds down (towards negative infinity). This is different from the way rounding is usually done in signed integer division (which rounds towards 0).
Can someone explain what is meant by rounding towards negative infinity and rounding towards zero (and how they differ) and give examples?
What I've noticed in C: -10 >> 4 = -1 because -10 = -1*16 + 6 but -10 / 16 = 0 because -10 = 0*16 - 10 (which is the same way % works, it gives negative remainder for negative numbers in C). I don't know if this is related to the text, but wanted to give info on what I know and don't know.