4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 1
MODULE 7
ERROR DETECTION
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 2
TRANSMISSION ERRORSTransmission errors are caused by:– thermal noise {Shannon}– impulse noise (e..g, arcing relays)– signal distortion during transmission
(attenuation)– crosstalk– voice amplitude signal compression
(companding)– quantization noise (PCM)– jitter (variations in signal timings)– receiver and transmitter out of synch
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 3
OBJECTIVES:
1. Introduce Data Communications2. Define Data Communication
Codes3. Discuss the Types of Data
Transmission andTypes of Errors
4. Explain Error Detection Schemes
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 4
DATA COMMUNICATIONS
- It is the process of transferring digital information (usually binary form) between two or more points
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 5
FORMS OF DATA
a. Alphabetical informationb. Numeric informationc. Symbolic information
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 6
DATA CODE
- is a set of rules that translates alphanumeric characters into binary numbers
- also called character codes, character sets, character languages or symbol codes
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 7
DATA COMMUNICATION CODES
1. Baudot Code - 1st fixed-length character - developed for machine rather than
people - 5-bit character code primarily used for
low- speed teletype system equipment
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 8
DATA COMMUNICATION CODES
2. ASCII Code (American Standard for Information Interchange) - 7-bit fixed length character set - is the standard character set for source coding the alphanumeric character set that humans understand but computers do not.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 9
DATA COMMUNICATION CODES
3. EBCDIC Code (Extended Binary-Coded Decimal Interchange Code)
- 8-bit fixed length character set
developed in 1962 by IBM- used almost exclusively with IBM
mainframe computers and peripheral equipment
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 10
DATA COMMUNICATION CODES
4. Bar Codes - is a series of vertical black bars separated
by vertical white bars (called spaces)
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 11
SERIAL and PARALLEL DATA TRANSMISSION
1. Parallel by bit or Serial by character
2. Serial by bit
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 12
SERIAL DATA TRANSMISSION
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 13
PARALLEL DATA TRANSMISSION
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 14
TYPES OR ERRORS
1. Single bit error- 1 bit of error has occurred
2. Burst error - 2 or more bits in the data unit have
changed from 1 to 0 or from 0 to 1
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 15
SINGLE BIT ERROR
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 16
BURST ERROR
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 17
“Error detection uses the concept of redundancy,
which means adding extra bits for detecting errors at
the destination.”
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 18
ERROR DETECTION
- Is the process of monitoring data transmission and determining when errors have occurred.
Purpose:“ Not to prevent error from occurring but to prevent UNDETECTED ERROR.”
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 19
GENERAL ERROR DETECTION SYSTEM
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 20
ERROR DETECTION METHODS
1. REDUNDANCY
- Transmitting each character twice
2. EXACT COUNT ENCODING
- The number of 1’s in each character is the same
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 21
REDUNDANCY
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 22
PARITY BIT
- Bit added to each character to make all bits add up to an even number (even parity) or odd number (odd parity)
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 23
EVEN PARITY CONCEPT
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 24
“Simple parity check can detect all single-bit errors. It can detect burst errors only if the total number of errors
in each data unit is odd.”
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 25
ERROR DETECTION METHODS
3. PARITY CHECKING
- adds 1 additional bit to each byte in the message
A) Odd ParityB) Even Parity
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 26
PARITY GENERATORS
I. Serial Transmission Parity Generator
II. Parallel Transmission Parity Generator
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 27
SERIAL TRANSMISSION PARITY GENERATOR
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 28
PARALLEL TRANSMISSION PARITY GENERATOR
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 29
PARITY CHECKING
Advantage:1. Simple
Disadvantages:1. If even number of errors has occurred it
can not be detected2. 50% efficiency
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 30
ERROR DETECTION METHODS
4. VRC/LRC
A) LRC - message parity
B) VRC - character parity
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 31
VERTICAL REDUNDANCY CHECKING
VRC entails the appending of a parity bit at the end of each transmitted character of value to create an odd or even total mathematical bit value.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 32
LONGITUDINAL REDUNDANCY CHECKING OR BLOCK CHECKING CHARACTER
LRC adds another level of reliability, as data is viewed in a block or data set, as though the receiving device were viewing data set in a matrix format.
LRC adds a significant measure of reliability. Also known as checksum, the LRC is sent as an extra character at the end of each data block.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 33
VRC/LRC
Advantage:1. Simple2. 98% reliability
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 34
EXAMPLE
Determine the VRC and LRC for the message “SANTINO”. Use ASCII Character, and also use odd parity for VRC and even parity for LRC. Determine What ASCII character is to be transmitted for checking the message.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 35
“In two-dimensional parity check, a block of bits is divided into rows and a redundant row of bits is
added to the whole block.”
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 36
ERROR DETECTION METHODS
5. CRC
- Is generally used with 8-bit codes such as EBCDIC.
- CRC 16: most common used CRC code in US and is identical to CCITT V.41
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 37
CRC GENERATING CIRCUIT
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 38
CRC GENERATOR
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 39
ERROR DETECTION METHODS
5. CRC
- CRC Character is the remainder of a division process.
G(x) - data messageP(x) - generator polynomial function
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 40
ERROR DETECTION METHODS
CRC 16
P(x) = x16 + x12 + x5 + x0
Advantage:1. 99.95% efficiency
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 41
CRC ALGORITHM
1. Multiply G(x) by xn-k (puts zeros in (n-k) low order positions)
2. Divide xn-k G(x) by P(x)
3. Add remainder B(x) to xn-k G(x) (puts check bits in the n-k low order positions):
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 42
CRC CHECKING
1. Add the CRC to the end of G(x)
2. Divide the product obtained in Step 1 by P(x)
“The remainder of the process should be equal to 0, otherwise error has occurred.”
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 43
EXAMPLE
Determine the BCS for the ff data and CRC generating polynomials.
G(x) = x7 + x5 + x4 + x2 + x1 + x0
P(x) = x5 + x4 + x1 + x0
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 44
CRC-12 : x12 + X11 + X3 + X2 + X + 1
CRC-16: x16 + x 15 + x2 + 1
CRC-CCITT: x16 + x12 + x5 + 1
MOST COMMONLY USED CYCLICCODES GENERATOR POLYNOMIAL
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 45
DATA UNIT AND CHECKSUM
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 46
6. CHECKSUM
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 47
CHECKSUM ALGORITHM AT THE SENDER
The sender follows these steps:
The unit is divided into k sections, each of n bits.
All sections are added using one’s complement to get the sum.
The sum is complemented and becomes the checksum.
The checksum is sent with the data.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 48
CHECKSUM ALGORITHM AT THE RECEIVER
The receiver follows these steps:
The unit is divided into k sections, each of n bits.
All sections are added using one’s complement to get the sum.
The sum is complemented.
If the result is zero, the data are accepted: otherwise, rejected.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 49
EXAMPLE
Suppose the following block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
Determine the checksum.
Prove that the receiver can detect the error.
4/18PREPARED BY: ENGR. JO-ANN
C. VIÑAS 50
EXAMPLE
Now suppose there is a burst error of length 5 that affects 4 bits.
10101111 11111001 00011101
Prove that the receiver can detect the error.