Question: I've been reading the classic Hacker's delight and I am having trouble understanding the difference between logical shift right,arithmetic shift right, and rotate right. Please excuse if the doubt seems too simple. 

[![Also why is there no arithmetic shift left?](https://i.stack.imgur.com/4J4Gi.png)](https://i.stack.imgur.com/4J4Gi.png)

Answer: 
The difference is pretty much explained in the right-most column.

* Logical shift treats the number as a bunch of bits, and shifts in zeros. This is the `>>` operator in C.
* Arithmetic shift treats the number as a signed integer (in 2s complement), and "retains" the topmost bit, shifting in zeros if the topmost bit was 0, and ones if it was one. C's right-shift operator has implementation-defined behavior if the number being shifted is negative.  

For example, the binary number `11100101` (-27 in decimal, assuming 2s complement), when right-shifted 3 bits using logical shift, becomes `00011100` (decimal 28). This is clearly confusing. Using an arithmetic shift, the sign bit would be kept, and the result would become `11111100` (decimal -4, which is about right for -27 / 8).
* Rotation does neither, since topmost bits are replaced by lowermost bits. C does not have an operator to do rotation.
**Logical right shift** means shifting the bits to the right and MSB(most significant bit) becomes 0.

Example: Logical right shift of number 1 0 1 1 0 1 0 1 is **0** 1 0 1 1 0 1 0.

**Arithmetic right shift** means shifting the bits to the right and MSB(most significant bit) is same as in the original number.

Example: Arithmetic right shift of number **1** 0 1 1 0 1 0 1 is **1** 1 0 1 1 0 1 0.