Check parity of a bit sequence