This document explains checksum, an error detection method that involves dividing data into blocks, performing addition on each block, and transmitting the final checksum value along with the original data. It also explains the Hamming code error correction method, which adds parity bits to data to detect and correct errors by their positions.
1. CHECKSUM (Error Detection Method)
Original Data (n = 32) β 10011001 11100010 00100100 10000100
K = 4
M = n/k = 8
Transmitter:
10011001
11100010
101111011
1
01111100 β Result 1
00100100
10100000 β Result 2
10000100
100100100
1
00100101 β Result 3 (Final Addition)
11011010 (1βs Complement of Final Result, called Checksum)
Checksum β 11011010
New Transmitted Data β
10011001 11100010 00100100 10000100 11011010
Receiver:
10011001
11100010
101111011
2. 1
01111100 β Result 1
00100100
10100000 β Result 2
10000100
100100100
1
00100101 β Result 3
11011010
11111111 β Result 4
00000000 β 1βs Complement
If 1βs complement is all zeros, then received data is true
Q. If received data is 10011001 11100010 00100100 10000100 01011010
Now, check weather the data is right or wrong
Q. If the original data is 11000110 00110011 10101010 11110000, so what
the resultant transmitted data you will form by using checksum.
(Homework Part)
Error Correction Method:
Hamming Code Method
Original Data (n)
No of Parity Bit (k)
Total length of transmitted data (l = n+k)
To calculate the value of k
2k
>= k+n+1 (we will take the minimum possible value for k)
n = 4,
3. 2k
>= k+4+1
2k
-k >= 5
K = 0
Not satisfy the eqn
K = 1
K = 2
K = 3, satisfying the eqn
N = 4,
K= 3,
L = 7
Ex:
1010 (n = 4)
Positions of k = 2k
; {k = 0, 1β¦β¦. (k-1)}
Positions of k = 1, 2, 4
Total length of data = l = n+k
1 2 3 4 5 6 7
P1 P2 n1 P3 n2 n3 n4
P1 P2 1 P3 0 1 0
We have to find the value of P1, P2 & P3
Octal Number System (0 to 7)
c3c2c1
ABC β No
000 β 0 (Homework Part)
001 β 1
010 2
011 3
5. 010 β error position β (2)
Received Data is wrong at 2nd
bit position
Correct Data is: 1011010
Q. If the received data is: 0111010, you have to check on odd parity that
this data is correct or not. If it is wrong then correct it.
1 2 3 4 5 6 7
0 1 1 1 0 1 0
P1 P2 n1 P3 n2 n3 n4
p1 -β c1 {1, 3, 5, 7} {0100} c1 β 0
p2 -> c2 {2, 3, 6, 7} {1110} c2 β 0
p3 β c3 {4, 5, 6, 7} {1010} c3 β 1
100 β 4 (error position)
Correct Data: 0110010
Data (1010) Hamming Code (0110010) using odd parity
Q. Original Data: 1110
Form Hamming Code using Even & Odd Parity Method.
Q. Received Data is: 1100110, check weather this data is correct or not? If
it is wrong, correct it.