0% found this document useful (0 votes)
2 views23 pages

Lesson Plan 3

The document outlines error checking methods in data transmission, focusing on parity checks and checksums. It explains how errors can occur during transmission and the importance of verifying data integrity through these methods. Parity checks involve using a parity bit to detect changes in data, while checksums calculate a value from data blocks to confirm accuracy upon receipt.

Uploaded by

isheanesu2222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views23 pages

Lesson Plan 3

The document outlines error checking methods in data transmission, focusing on parity checks and checksums. It explains how errors can occur during transmission and the importance of verifying data integrity through these methods. Parity checks involve using a parity bit to detect changes in data, while checksums calculate a value from data blocks to confirm accuracy upon receipt.

Uploaded by

isheanesu2222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

WISETECH COLLEGE

curriculum

F3
CS
MR CHIRINDA
FOCUS: UNDERSTANDING ERROR CHECKING METHODS

Success criteria

Some (A-A*): Describe the processes involved in each of the


following error detection methods for detecting
errors in data after transmission: parity check
(odd and even), checksum

Most (B-A): Understand the need to check for errors after


data transmission and how these errors can occur

ALL (C-B): State the different error checking methods

Keywords: Parity,checksum
VIDEO
The need to check for errors

• When data is transmitted, there is always a risk that it may be corrupted,


lost or even gained.
• Errors can occur during data transmission due to:
» interference (all types of cable can suffer from electrical interference,
which can cause data to be corrupted or even lost)
» problems during packet switching (this can lead to data loss – or it is
even possible to gain data!)
» skewing of data (this occurs during parallel data transmission and
can cause data corruption if the bits arrive out of synchronization).
• There are a number of ways data can be checked for errors following
transmission:
» parity checks
» checksum
» echo check
Parity checks

• Parity checking is one method used to check whether data has been
changed or corrupted following data transmission. This method is
based on the number of 1-bits in a byte of data.
• The parity can be either called EVEN (that is, an even number of 1-bits
in the byte) or ODD (that is, an odd number of 1-bits in the byte). One
of the bits in the byte (usually the most significant bit or left-most bit)
is reserved for a parity bit. The parity bit is set according to whether
the parity being used is even or odd. For example, consider the byte:
• In this example, if the byte is using even parity, then the parity bit
needs to be set to 0, since there is already an even number of 1-bits
in the byte (four 1-bits). We thus get
• In this example, if the byte is using odd parity, then the parity bit
needs to be set to 1, since we need to have an odd number of 1-bits
in the byte. We thus get
• Before data is transferred, an agreement is made between sender and
receiver regarding which type of parity is being used. Parity checks are
therefore being used as a type of transmission protocol
Activity
• If a byte has been transmitted from ‘A’ to ‘B’, and if even parity is
used, an error would be flagged if the byte now had an odd number
of 1-bits at the receiver’s end. For example (assuming even parity is
being used)
• In this case, the byte received has three 1-bits, which means it now
has odd parity; while the sender’s byte was using even parity (four 1-
bits). This means an error has occurred during the transmission of the
byte. The error is detected by the recipient’s computer re-calculating
the parity of the byte sent. If even parity had been agreed between
sender and receiver, then a change in parity in the received byte
indicates that a transmission error has occurred.
• If two of the bits change value following data transmission, it may be
impossible to locate the error using parity checking.
• Let us imagine we are transmitting the following byte, using even
parity
• Suppose more than one bit has been modified during data
transmission. This means the byte could have reached the destination
as any of the following
• In all these cases, the byte has clearly been corrupted, but the bytes
have retained even parity. Therefore, no error would be flagged in
spite of the obvious errors in transmission. Clearly it will be necessary
to have other ways to complement parity when it comes to error
checking to ensure errors are never missed. One such method is
called checksum .
• You should have concluded that any of the bits in question 2 (Activity
2.5) could have been changed where there was a transmission error.
Therefore, even though an error has been flagged, it is impossible to
know exactly which bit is in error.
• One of the ways round this problem is to use parity blocks. In this
method, a block of data is sent and the number of 1-bits are totalled
horizontally and vertically (in other words, a parity check is done in
both horizontal and vertical directions). As the following example
shows, this method not only identifies that an error has occurred but
also indicates where the error is
Example 1

• In this example, nine bytes of data have been transmitted. Agreement


has been made that even parity will be used. Another byte, known as
the parity byte, has also been sent. This byte consists entirely of the
parity bits produced by the vertical parity check. The parity byte also
indicates the end of the block of data.
• Table 2.3 shows how the data arrived at the receiving end. It is now
necessary to check the parity of each byte horizontally (bytes 1 to 9)
and vertically (columns 1 to 8). Each row and column where the parity
has changed from even to odd should be flagged:
Parity block
• First of all, the table shows that an error has occurred following data
transmission (there has been a change in parity in one of the bytes)
Checksum

• A checksum is a method used to check if data has been changed or


corrupted following data transmission. Data is sent in blocks, and an
additional value, called the checksum, is sent at the end of the block
of data.
• The checksum process is as follows
when a block of data is about to be transmitted, the checksum is calculated
from the block of data
» the calculation is done using an agreed algorithm (this algorithm has been
agreed by sender and receiver)
» the checksum is then transmitted with the block of data
» at the receiving end, the checksum is recalculated by the computer
using the block of data (the agreed algorithm is used to find the checksum)
» the re-calculated checksum is then compared to the checksum sent with the
data block
» if the two checksums are the same, then no transmission errors have
occurred; otherwise a request is made to re-send the block of data.

You might also like