How can I shift a column in 8x8 area? For example, I have this one 64-bit unsigned integer as follows:
#include <boost/cstdint.hpp>
int main()
{
/** In binary:
*
* 10000000
* 10000000
* 10000000
* 10000000
* 00000010
* 00000010
* 00000010
* 00000010
*/
boost::uint64_t b = 0x8080808002020202;
}
Now, I want to shift the first vertical row let say four times, after which it becomes this:
/** In binary:
*
* 00000000
* 00000000
* 00000000
* 00000000
* 10000010
* 10000010
* 10000010
* 10000010
*/
b == 0x82828282;
Can this be done relatively fast with only bit-wise operators, or what?