0% found this document useful (0 votes)
6 views

Lesson 5 Error Codes

The document discusses various methods for error detection in digital data transmission, including parity bits, cyclic redundancy check (CRC), and Hamming code. Parity bits can detect single-bit errors but not multiple errors, while CRC can detect one- and two-bit errors using a generator code and check bits. Hamming code allows for the detection and correction of single-bit errors by introducing redundancy bits in the data transmission.

Uploaded by

Lestor Narib
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lesson 5 Error Codes

The document discusses various methods for error detection in digital data transmission, including parity bits, cyclic redundancy check (CRC), and Hamming code. Parity bits can detect single-bit errors but not multiple errors, while CRC can detect one- and two-bit errors using a generator code and check bits. Hamming code allows for the detection and correction of single-bit errors by introducing redundancy bits in the data transmission.

Uploaded by

Lestor Narib
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Error Codes

Parity Method for Error Detection


 Many systems use a parity bit as a means for bit error
detection.
 A parity bit is attached to a group of bits to make the total
number of 1s in a group always even or always odd.
 A if a system operates with even parity, a check is made
on each group of bits received to make sure the total
number of 1s in that group is even. If there is an odd
number of 1s, an error has occurred. given system
operates with even or odd parity, but not both.
 The parity bit can be attached to the code at either the
beginning or the end,
The BCD code with parity bits
Detecting an Error
 A parity bit provides for the detection of a single bit error but
cannot check for two errors in one group.
 let’s assume that we wish to transmit the BCD code 0101.
 The total code transmitted, including the even parity bit, is

 let’s assume that an error occurs in the third bit from the left (the
1 becomes a 0).
Detecting an Error

 When this code is received, the parity check circuitry determines


that there is only a single 1 (odd number), when there should be
an even number of 1s. Because an even number of 1s does not
appear in the code when it is received, an error is indicated.
 EXAMPLE
Cyclic Redundancy Check

 Cyclic redundancy check (CRC) is a widely used code used for


detecting one- and two-bit transmission errors when digital data
are transferred on a communication link.
 In CRC, a certain number of check bits, sometimes called a
checksum, are appended to the data bits (added to end) that are
being transmitted.
 The transmitted data are tested by the receiver for errors using
the CRC.
CRC Process

The process is as follows:


 1. Select a fixed generator code; it can have fewer bits
than the data bits to be checked.
 2. Append a number of 0s equal to the number of bits
in the generator code to the data bits.
 3. Divide the data bits including the appended bits by
the generator code bits using modulo-2.
 4. If the remainder is 0, the data and appended bits
are sent as is.
CRC Process

 5. If the remainder is not 0, the appended bits are


made equal to the remainder bits in order to get a 0
remainder before data are sent.
 6. At the receiving end, the receiver divides the
incoming appended data bit code by the same
generator code as used by the sender.
 7.If the remainder is 0, there is no error detected If the
remainder is not 0, an error has been detected in the
transmission and a retransmission is requested by the
receiver.
The CRC process.

Transmitting end of communication link


The CRC process

Receiving end of communication link


EXAMPLE
Solution
 Divide the appended data by the generator code (red) using the
modulo-2 operation until all bits have been used.
 Remainder = 0100. Since the remainder is not 0, append the
data with the four remainder bits (blue). Then divide by the
generator code (red). The transmitted CRC is 110100110100.
Hamming Code

 The Hamming code is used to detect and correct a


single-bit error in a transmitted code.
 To accomplish this, four redundancy bits are
introduced in a 7-bit group of data bits.
 These redundancy bits are interspersed at bit
positions 2n (n = 0, 1, 2, 3) within the original data
bits. At the end of the transmission, the redundancy
bits have to be removed from the data bits.

You might also like