ok, i understand the formula now. thanks! :)
Type: Posts; User: Warzaw
ok, i understand the formula now. thanks! :)
By portable do you mean 32-bit and 64-bit systems?
ok, i was able to get a solution for the bit wise rotation without using the sizeof() function for rotate right: :)
temp = n1 & 0x1;
n1 >>= 1;
n1 = n1 | (temp << 31);
however, im still...
Thanks for the reply.
ok i played with it a bit using hexadecimal 49 and 10. I got the same answer (49000) even though i just used:
(x << shift) | (x >> (x - shift)). :confused:
Hi,
Im trying to create a bit rotate function for a "hexadecimal calculator". I found a code in wikipedia that seems to work:
unsigned int x; unsigned int y; /* ... */ y = (x << shift) |...