I think to start you want you'll want to clarify the question. It sounds like you're wanting at a function that will return 0 if any of the bits in a word are "1", and something other than 0 if all the bits are zero. Assuming a 32bit word "a" you could do something like:
na1 = ~a;
shifted_na1 = na1 >> 1;
na2 = shifted_na1 & na1; /* any sequence of zeros is now 2 bits long */
shifted_na2 = na2 >> 2;
na3 = shifted_na2 & na2; /* any sequence of zeros is now 4 bits long */
shifted_na3 = na3 >> 4;
na4 = shifted_na3 & na3; /* any sequence of zeros is now 8 bits long */
shifted_na4 = na4 >> 8;
na5 = shifted_na4 & na4; /* any sequence of zeros is now 16 bits long */
shifted_na5 = na5 >> 16;
final = shifted_na5 & na5; /* any sequence of zeros is now 32 bits long */
really_final = final & 1;