Parity is the oldest and cheapest error-detection trick in computing: count the 1 bits and remember whether that count is even or odd. This tool tells you the parity of any integer and, for both the even-parity and odd-parity conventions, exactly which bit you would append to a frame.
How it works
The tool counts the set bits in your value and takes that count modulo 2:
ones = number of 1 bits in the value
data parity = ones mod 2 // 0 = even, 1 = odd
even bit = data parity // appended, keeps the total even
odd bit = 1 − data parity // appended, keeps the total odd
For even parity the appended bit makes the overall number of 1 bits even; for odd parity it makes the overall count odd. A receiver recomputes parity over the data plus the parity bit and flags an error if it does not match the agreed scheme. A single flipped bit always changes the count, so it is always caught.
Example and notes
The byte 182 is 10110110, which contains five 1 bits — an odd number, so its
data parity is odd. To transmit it under even parity you would append a 1
(making six 1 bits, even); under odd parity you would append a 0 (leaving five,
odd). Parity cannot locate or correct the error, only detect it, and it misses
errors that flip an even number of bits — that is why robust systems layer CRCs
or Hamming codes on top.