Last active
August 29, 2015 14:16
-
-
Save mdurys/c318cc29a8f455ab200a to your computer and use it in GitHub Desktop.
Do a circular right shift by $n bits on a 30-bit $value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $shifted = ($value >> $n) | ($value << (30 - $n) & 0x3fffffff); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment