4.3.11 Right-shifting Signed Values
Right-shifting a signed value will involve sign extension. This will preserve the sign of the original value.
Example
The following shows an example of a negative quantity involved in a right-shift operation.
signed char output, input = -13;
output = input >> 3;
Under the CCI, the value of output
after the assignment
is -2 (i.e., the bit pattern 0xFE).
Differences
All compilers have performed right-shifting as described in this section.
Migration to the CCI
No action required.