Can someone give me some pointers on bit rotation. how do I rotate to the left or right a given number of bits.

Thanks!