Search:

Type: Posts; User: redhawk87

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    696

    ok, I tried printing it out using printf("%x", x)...

    ok, I tried printing it out using printf("%x", x) and printf("%d",x) and got 0xFFFFFFFF and -1 respectively. So it looks like it is working. So my question is, why does cout print a wrong value?...
  2. Replies
    3
    Views
    696

    Problems with bit manipulation

    I was trying to get a variable to represent all 1's. here is my code:

    unsigned long long x;
    x = ~0;

    cout << x << endl;

    when x is printed, it give me 18446744073709551615. I plug that into...
  3. Replies
    15
    Views
    3,641

    I misread a persons comment. Thought they were...

    I misread a persons comment. Thought they were trying to say I was stupid cause the print statements I put there would not compile... I re-read and realized that was all in my head. I deleted the...
  4. Replies
    15
    Views
    3,641

    I was printing it out as %d instead of %f lol!...

    I was printing it out as %d instead of %f lol! gotta love stupid mistakes...
  5. Replies
    15
    Views
    3,641

    here are my variables: unsigned int instCount;...

    here are my variables:
    unsigned int instCount;
    unsigned int cycleCount;

    //lots of code

    double IPC = (double) instCount / cycleCount;

    printf(//instructions);
    printf(//cycles);
  6. Replies
    15
    Views
    3,641

    how to divide two ints and get a double?

    I am having troubler with simple division. I know this might be a stupid question but here is my code:

    unsigned int totalCycles;
    unsigned int cycleCount;

    double IPC = (double) totalCycles /...
Results 1 to 6 of 7