This is just something I wanted to do for fun, no real practical use of it.
Say for example I enter 0xDEADAAAA
I want to be able to transform the value into 0xDDEAAAAA
Meaning the 4 most significant bytes shift over one byte. And the 4th most significant byte now becomes the first most significant byte.
Kind of like a circular shift of the first 4 bytes.
For now I'm doing
value = value >> ((sizeof(unsigned int) * 8) / 2);
This will shift all bytes over one byte. But how would I do the circular roll of the 4th most significant byte into the MSB?