randRange( 0, 255 ) randFromArray(["even", "odd"]) to8BitString(Dec)

In an Parity parity scheme the binary string Bits would be detected as containing an error. T or F?

(!checkParity(Bits, Parity)).toString().charAt(0).toUpperCase()

There are countOnes(Bits, Parity) bits that are 1s in Bits.

The parity is Parity and the string has countOnes(Bits,Parity) bits that are 1s.

For Parity parity there should be an Parity number of 1s in the string. So it is (!checkParity(Bits, Parity)).toString() to say this contains an error.