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 going to split my int using shifts into 4, 8 bit variables. int a, b, c, d
Now I am going to not them so now I will test if the bit is set to 1 instead of 0. To test if its set to 1 I will and them by 01010101.
Now I dont know how to tell if every even bit is set to 1. I cannot use if/for/while loops or any conditional statements and need to use bitwise operators. Any ideas????