RosettaCodeData/Task/Bitwise-operations/C/bitwise-operations-2.c
Ingy döt Net 518da4a923 B
2013-04-10 16:19:29 -07:00

5 lines
126 B
C

/* rotate x to the right by s bits */
unsigned int rotr(unsigned int x, unsigned int s)
{
return (x >> s) | (x << 32 - s);
}