I am working wiht pic32mx controller and using the C32 toolsuite v2.02 compiler amd MPLAB-X IDE v 3.05. I am using the bit wise operation with the long long variable but getting erroneous result.
int main()
{
long long data0, data1=0;
data0 = 489631651402;
data1 = data0 & 0x0FFFFFFFFFF;
printf("%llu\n%llu\n", data0, data1 );
return 0;
}
OUTPUT:
489631651402
492260348528
According to calculation this result is erroneous. data0 and data1 must be equal.
Please suggest me any better way for this operation. if there's any error in above procedure please suggest the right path.