I have a 32 bit int I can only access it 8 bits at a time. I need to find out if every even bit is set to 0 and return 0 if its true and 1 otherwise.
So far I am goi
There is no need to test every individual byte against a mask of 0x55. Just "or" the bytes together and test the result against the mask:
return ((a | b | c | d) & 0x55 != 0);
Any even bit set to 1 will make the result of the "and" not be 0 anymore, so it will return 1. If all even bits are 0, then 0 is returned.