Consider the previous problem, but instead suppose these 10 bytes contain
a. the binary representation of the numbers 1 through 10.
b. the ASCII representation of the letters B through K (uppercase).
c. the ASCII representation of the letters b through k (lowercase).
Compute the Internet checksum for this data.
The following steps are used to calculate the the Internet checksum for this data:
a)
The binary representation of the numbers 1 through 10:
Numbers | Binary |
1 | 00000001 |
2 | 00000010 |
3 | 00000011 |
4 | 00000100 |
5 | 00000101 |
6 | 00000110 |
7 | 00000111 |
8 | 00001000 |
9 | 00001001 |
10 | 00001010 |
Now, calculate the Checksum by using above step 1 and step 2:
setp 1:
So, sum is 0001 1001 0001 1110
setp 2: Now, convert 1's complement for check sum result. 1's complement means convert 0's to 1's and 1's t0 0's.
0001 1001 0001 1110=>1110 0110 1110 0001
So, the Internet checksum for the binary representation of the numbers 1 through 10 is 1110 0110 1110 0001
b)
The ASCII representation of the letters B through K (uppercase) :
Letters | ASCII |
B | 66 |
C | 67 |
D | 68 |
E | 69 |
F | 70 |
G | 71 |
H | 72 |
I | 73 |
J | 74 |
K | 75 |
Now, convert ASCII values to binary representation:
ASCII Value | Binary |
66 | 01000010 |
67 | 01000011 |
68 | 01000100 |
69 | 01000101 |
70 | 01000110 |
71 | 01000111 |
72 | 01001000 |
73 | 01001001 |
74 | 01001010 |
75 | 01001011 |
Now calculate the checksum by using above step 1 and step2:
setp 1:
The sum is =01011111 01100011
setp 2: Now, convert 1's complement for check sum result. 1's complement means convert 0's to 1's and 1's t0 0's.
So, the Internet checksum for the ASCII representation of the letters B through K (uppercase) is 10100000 10011100
c)
The ASCII representation of the letters b through k (lowercase):
Letters | ASCII |
a | 98 |
b | 99 |
c | 100 |
d | 101 |
e | 102 |
f | 103 |
g | 104 |
h | 105 |
i | 106 |
j | 107 |
Now, convert ASCII values to binary representation:
ASCII Value | Binary |
98 | 01100010 |
99 | 01100011 |
100 | 01100100 |
101 | 01100101 |
102 | 01100110 |
103 | 01100111 |
104 | 01101000 |
105 | 01101001 |
106 | 01101010 |
107 | 01101011 |
Now calculate the checksum by using above step 1 and step2:
setp 1:
The sum is 11111111 11111011
setp 2: Now, convert 1's complement for check sum result. 1's complement means convert 0's to 1's and 1's t0 0's.
So, the Internet checksum for the ASCII representation of the letters b through k (lowercase) is 00000000 00000100