How does parity work?

 

A parity bit (either a '0' or a '1') is added to the sequence of bits before transmission to make the total number of '1' bits either even or odd.