I have a one 64-bit integer, which I need to rotate 90 degrees in 8 x 8 area (preferably with straight bit-manipulation). I cannot figure out any handy algorith
If an if-powered loop is acceptable, the formula for bits is simple enough:
8>>Column - Row - 1
Column and Row are 0-indexed.
This gives you this mapping:
7 15 23 31 39 47 55 63 6 14 22 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 8 16 24 32 40 48 54