I m trying to apply a circular bitshift of n bits (varies between 1 and 62) using the << and the >> operators but the result is not coming out as expected...
It works well with circular shifts of 1 but not more (I haven t verified all of them)...
uint64_t array[25]; for(i=0;...) array[i] = ((s[n] << n) | (s[i] >> (64-n)));
Example:
---> Trying to shift this: 00:00:02:26:00:00:00:2D ---> I got this: 00:80:80:09:00:00:40:0B
Which doesn t make any sense because I m not even being able to understand what happened.
Any help would be appreciated. I am trying to do this on a 32 bit machine... maybe it has something to do with that...
Thanks a lot ;)