previous | start | next

Right shift for the int data type

This operator works like the right shift for unsigned int's except for the way the left most bits are filled in.

Unfortunately, the C standard doesn't specify which of two possible meanings should be used. Consequently, some compiler implementations might choose one meaning, while other compilers, the other meaning.

One meaning of right shift for signed int's is just the same as for unsigned int's. This is called logical right shfit.

The other meaning of right shift for signed int's is called arithmetic right shift. It is described next:



previous | start | next