Left and Right Bit Rotation using Bitwise Operators

Reading time: minutes | Coding time: minutes

A bitwise operation involves manipulation of one or more bits of a bit pattern. A bitwise operation can simply be done using bitwise operators. In reality, what actually happens is that the decimal number is converted to a binary number internally by the processor and then manipulation takes place on a bit level. In bit rotation, the bits are shifted to the direction specified.

This is a companion discussion topic for the original entry at http://iq.opengenus.org/rotation-of-bits-using-bitwise-operators/