Search:

Type: Posts; User: Warzaw

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,272

    ok, i understand the formula now. thanks! :)

    ok, i understand the formula now. thanks! :)
  2. Replies
    8
    Views
    1,272

    By portable do you mean 32-bit and 64-bit systems?

    By portable do you mean 32-bit and 64-bit systems?
  3. Replies
    8
    Views
    1,272

    ok, i was able to get a solution for the bit wise...

    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...
  4. Replies
    8
    Views
    1,272

    Thanks for the reply. ok i played with it a...

    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:
  5. Replies
    8
    Views
    1,272

    [HW] Bit rotation

    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) |...
Results 1 to 5 of 5