0
0
Computer Networksknowledge~10 mins

Error detection (parity, CRC, checksum) in Computer Networks - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Error detection (parity, CRC, checksum)
Data to send
Add error detection code
Send data + code
Receive data + code
Check error detection code
Accept
Data is sent with extra bits for error checking. Receiver uses these bits to detect errors and decide if data is correct or needs resending.
Execution Sample
Computer Networks
Data bits: 1011001
Parity bit: 1 (even parity)
Send: 10110011
Receiver checks parity
If parity matches, accept data
This example shows adding a parity bit to data and checking it at the receiver to detect errors.
Analysis Table
StepData bitsParity bitParity Check ResultAction
11011001Calculate parity bit (even parity)Parity bit = 1Append parity bit to data
210110011Received parity bit = 1Check parity of received bitsParity matches, no error detected
310110001 (error introduced)Received parity bit = 1Check parity of received bitsParity mismatch, error detected
4---Request resend or error correction
💡 Error detected when parity check fails, triggering resend or correction
State Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
Data bits10110011011001101100111011000110110001 (with error)
Parity bitN/A1111
Parity check resultN/AN/AMatchMismatchMismatch
Key Insights - 3 Insights
Why does the parity bit help detect errors?
The parity bit makes the total number of 1s even (or odd). If a single bit flips during transmission, the parity will not match, signaling an error (see execution_table step 3).
Can parity detect all errors?
No, parity can detect only an odd number of bit errors. If two bits flip, parity may still match, missing the error.
What happens if an error is detected?
The receiver requests the sender to resend the data or uses error correction methods (see execution_table step 4).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 2, what is the parity check result?
AParity matches, no error detected
BParity mismatch, error detected
CParity bit not calculated
DData bits are incorrect
💡 Hint
Check the 'Parity Check Result' column at step 2 in execution_table
At which step does the error get detected according to the execution_table?
AStep 1
BStep 2
CStep 3
DStep 4
💡 Hint
Look for 'Parity mismatch' in the 'Parity Check Result' column
If the parity bit was not added, how would the error detection change?
AErrors would still be detected reliably
BErrors might not be detected at all
CMore errors would be introduced
DData size would increase
💡 Hint
Refer to the role of parity bit in variable_tracker and execution_table
Concept Snapshot
Error detection adds extra bits (parity, CRC, checksum) to data.
Parity bit makes total 1s even or odd to detect single-bit errors.
CRC uses polynomial division for stronger error detection.
Checksum sums data parts to detect errors.
Receiver checks these codes to accept or request resend.
Full Transcript
Error detection methods add extra bits to data before sending. Parity bit ensures the total number of 1s is even or odd, helping detect single-bit errors. CRC uses a mathematical division method to detect more complex errors. Checksum adds parts of data to detect errors. When data arrives, the receiver checks these codes. If they match, data is accepted. If not, the receiver asks for resend or corrects errors. This process helps keep data accurate during transmission.