In a arithmetic right shift a >> n
, bits in a
are shifted to the right (equivalent to dividing by ). Bits shifted in from the left are filled with the most significant digit in the original a
, e.g. if a
is an int
with 4 bytes (32 bits) and the 32nd bit is , bits to the left will be after an arithmetic right shift of places.
Shift type in C
In C, right shifts applied to signed integer types are arithmetic right shifts.