This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
How do we calculate if it is (b<<31) and (b >>31) I would really appreciate if you can explain this to me.
If we're talking about int values, only the five lowest-order bits are used. It's as if the number you're shifting by is &'ed with 31 (0x1F). In this case, 31 & 31 == 31. So, you'll shift left 31 times, with bits falling off into the void on the left hand side as necessary(e.g., 5 << 31 == -2147483648).