Gday, I was wondering whether someone can help.
I need to perform shifts and bitwise operations on 64bits. I am trying to shift bits on a double type - 8 bytes. I think the problem lies in the fact that a machine word is 4 bytes. The following code seems to compile ok
double mask = 1 << 31;
but when i try something like this
double a, temp;
temp = mask & a;
i get an error something like: illegal operation on binary &.
Can anyone suggest a fix, perhaps some pointers on shifting bits between machine worsds.
You cannot use bitwise operands on floating point variables.
Thanks, i hadn't considered that.