As has been previously been stated data transmission over a medium is prone to corruption by interference. Since data is transmitted in digital form and this consists of only ones and zeroes, an error can only have two possible effects - a one can be altered to a zero and vice versa. In fact, depending on the duration of the interference it may be that more than one bit is corrupted. Therefore it is essential that data transmission systems contain some kind of error detection, and two of the most common are: parity and checksums.
As mentioned previously an ASCII character is encoded as seven bits whereas each character is stored as an eight-bit byte - the additional bit used as a parity check.
In even parity the parity bit is used to ensure that the total number of one bits in the byte is always even. On the other hand in odd parity the parity bit is employed to ensure that the total number of one bits is odd. The sender sets the parity before transmission and the receiver checks it on receipt, and strips it if necessary. If the parity bit is found to be wrong then the character has been corrupted in some manner, during transmission.
Although a parity check will detect a single bit error in a character (a single zero altered to a one or vice versa) it will not recognise a corruption in which the errors have cancelled each other out.
Thus a more sophisticated check can be accomplished by dealing with a block of data at a time. In addition to calculating the parity bit for each character (horizontal parity), the parity for all equivalent bits in the block is calculated (vertical parity). This forms a Block Check Character (BCC) and is illustrated below:
However, as can be seen from the illustration immediately below errors can still go undetected using this two-coordinate parity checking.
It should be noted that:
Even though it is apparent that two-coordinate parity checking is useful when data is transmitted in character form, it does carry a considerable overhead in terms of the number of additional parity bits which must be transmitted.
Yet, in the modern computer communications environment it is becoming clear that there is a greater attraction to transmit data in pure binary form. One alternative to parity bits is cyclic redundancy checksum (CRC).
In this context the complete block of data is treated as a single binary integer. An integer division by some constant is carried out on this, hence leaving a quotient and a remainder. The remainder is transmitted along with the data block and is compared to the remainder obtained by the receiver on performing the same calculation. If they match exactly then transmission of the information must have occurred without corruption.