Re: [PATCH V3 01/29] bitops: add parity functions

From: Zeng Zhaoxiu
Date: Mon Apr 25 2016 - 05:14:26 EST


å 2016å04æ20æ 02:45, George Spelvin åé:
Add generic odd parity functions, adapted from
"https://graphics.stanford.edu/~seander/bithacks.html#ParityParallel";
Given a PARITY_MAGIC of 0x6996, this is even parity, not odd.

(Which it should be; an XOR of all bits is the "natural" form.)

From "http://www.encyclopedia.com/doc/1O11-oddparity.html";, we can get
the definition of "odd parity":

odd parity A property that holds when a group of binary values contains an odd number of 1s.