Left and right shift operators (<< and >>) are already available in C++. However, I couldn\'t find out how I could perform circular shift or rotate operations.
If x is an 8 bit value, you can use this:
x=(x>>1 | x<<7);