Subj : parity checksum algorithm To : comp.programming From : Paminu Date : Wed Oct 05 2005 10:59 am I am interested in getting some help with the "even parity check" algorithm. I used google to find this: unsigned parity(unsigned arg) {   unsigned a = arg;   a ^= a >> 16;   a ^= a >> 8;   a ^= a >> 4;   a ^= a >> 2;   a ^= a >> 1;   return a & 1; } Who have invented this algorithm? Is it possible to find an explanation somewhere because I see that it works but would never myself have come up with it. Therefore I would like to know the theory behind it. .