In: Computer Science
Solution:
Given,
=>Transmitted byte = 10101010
=>Single bit even parity check for error detection is used.
(a)
Given,
=>Received byte = 1011010
Explanation:
=>The number of 1's in the received byte = 4 which is even and we are using even parity so no error will be detected.
(b)
Given,
=>Received byte = 10111010
Explanation:
=>Number of 1's in the received byte = 5 which is odd and we are using even parity so error will be detected.
(c)
Given,
=>Data block = E3 4F 23 96 44 27 99 D3
Explanation:
Finding checksum:
Step 1:
=>Add the data bytes of all the segments
=>Result = E3 + 4F + 23 + 96 + 44 + 27 + 99 + D3
=>Result = 11100011 + 01001111 + 00100011 + 10010110 + 01000100 + 00100111 + 10011001 + 11010011
=>Result = 1111000010
Step 2:
=>As result contains 10 bits so wrapping around 2 extra bits
=>Result = 11 + 11000010
=>Result = 11000101
Step 3:
=>Taking the 1's complement of result obtained in step 2
=>1's complement of result 11000101 = 00111010
=>Hence checksum = 00111010
=>Checksum in hexadecimal = 3A
Verification:
Step 1:
=>Adding all the data segments and checksum
=>Result = 11100011 + 01001111 + 00100011 + 10010110 + 01000100 + 00100111 + 10011001 + 11010011 + 00111010
=>Result = 1111000010 + 00111010
=>Result = 1111111100
Step 2:
=>Result contains 10 bits so wrapping around 2 extra bits
=>Result = 11111100 + 11
=>Result = 11111111
Step 3:
=>Taking the 1's complement of the result obtained in step 2.
=>1's complement of result = 00000000
=>Hence the checksum has no error and is verified.
I have explained each and every part with the help of statements attached to it.