Parity bits are used as a very simple checksum to ensure that binary data isn't corrupted during transit. Here's how they work:
Create a function that adds the correct parity bit to a binary string.
addParityBit("1011011") ➞ "10110111"
// There are five 1's.
// Since five is odd, the parity bit should be a 1.
// Add the parity bit to the end of the string.
// Return the result.
addParityBit("0110000") ➞ "01100000"
addParityBit("0101101") ➞ "01011010"
addParityBit("1111111") ➞ "11111111"
All inputs will be 7-bits long (so that the parity bit makes it a full byte).