You are on page 1of 18

Error checking and

Cambridge correction
IGCSE Unit 2: Communication and
Computer Science
Internet technologies
Section 1

2
Objectives
• Understand the need to check for errors in data
transmission
• Explain how parity bits are used for error detection
• Calculate and describe the use of check digits
• Identify and describe checksums for error detection
• Describe the use of Automatic Repeat reQuests
(ARQ) to check for correct data transmission
Error checking and correction
Unit 2 Communication and Internet technologies

Transmission errors
• When data is transmitted, it doesn’t
always arrive in the same format that
it was sent
• Electrical interference
• Power surges
• Synchronisation issues
• Wear and tear on the cable or connectors

• These errors cause bits to flip from


1s to 0s and 0s to 1s
Error checking and correction
Unit 2 Communication and Internet technologies

Error checking
• Computers need methods to check for data
transmission errors caused by interference
• These methods include the use of:
• Parity bits
• Check digits
• Check sums and
• Automatic Repeat reQuests (ARQ)
Error checking and correction
Unit 2 Communication and Internet technologies

Parity bits
• Computers use either odd or even parity
• When sending a byte of data, one bit is used as a
parity bit
• This bit is set to a 1 or 0 to make the total number of
1s or 0s in the byte (including the parity bit) odd or
even depending on the machine

0 1 0 0 1 1 0 1
Parity bit
Error checking and correction
Unit 2 Communication and Internet technologies

Odd or even parity


• What would the value of the parity bit be for the
following, using even parity?

1 0 0 1 0 1 0
Parity bit

• Give the parity bit value here using odd parity?

0 1 0 1 1 0 1
Parity bit
Error checking and correction
Unit 2 Communication and Internet technologies

Using parity for error detection


• When data is transmitted, the parity bit is set at the
transmitting end and parity is checked at the
receiving end
• If the wrong number of bits are ‘on’, an error has
occurred
• The receiving computer notifies the transmitting end
and the data is resent
• How could a parity check allow an erroneous byte past
detection?
Error checking and correction
Unit 2 Communication and Internet technologies

Check digits
• A check digit is an additional digit at the end of a
string of other numbers designed to check for
mistakes in input or transmission
• Printed books and other products have a unique
barcode with an ISBN (International Standard Book
Number) or EAN (European Article Number)
• The first 12 digits of the barcode are the unique item
number, the 13th is the check digit
• This can be calculated using the Modulo 10 system
Error checking and correction
Unit 2 Communication and Internet technologies

Calculating the check digit

ISBN 5 0 1 4 0 1 6 1 5 0 8 2 1
Weight 1 3 1 3 1 3 1 3 1 3 1 3  
Multiplication 5 0 1 12 0 3 6 3 5 0 8 6  
Addition Add all the numbers 49
Remainder Find the remainder when divided by 10 9
Subtraction Subtract the result from 10 1
Error checking and correction
Unit 2 Communication and Internet technologies

Calculating the check digit

ISBN 9 7 8 1 9 1 0 5 2 3 0 2 5
Weight 1 3 1 3 1 3 1 3 1 3 1 3  
Multiplication 9 21 8 3 9 3 1 15 2 9 1 6  
Addition Add all the numbers 49
Remainder Find the remainder when divided by 10 9
Subtraction Subtract the result from 10 1
Error checking and correction
Unit 2 Communication and Internet technologies

Worksheet 2
• Complete Task 1 to calculate the check digit on the
back of a book, or the one below:
Error checking and correction
Unit 2 Communication and Internet technologies

Checksums
• A checksum works in a similar way to a check digit
• The checksum of all bytes in a data transmission is calculated
using an algorithm
• The checksum is sent with the data
• The receiving computer recalculates the checksum based on
the data it received and compares it with the checksum
received or a known, expected value
• If it does not match, the data may have been altered or
corrupted during transmission and the data is resent
• Checksums are used with credit card numbers
Error checking and correction
Unit 2 Communication and Internet technologies

Simple checksum example


• The number of bytes in the transmission is counted
as 4
• The checksum is given the value 4 in binary and
sent with the real data

00000100 01101011 11011011 01101010 10010110


Check sum

• What flaws or weaknesses are there in the method used in


this example?
Error checking and correction
Unit 2 Communication and Internet technologies

Automatic Repeat reQuests


• Computers using ARQs will automatically return an
acknowledgement that the data was correct
• The simplest Stop-and-wait ARQ will
resend the data if an acknowledgement
is not received within a specific time
period; it will assume that there was
a flaw in the data or transmission error
• It is sometimes used with mobile phone
network data
Error checking and correction
Unit 2 Communication and Internet technologies

ARQ flowchart
START

Set timer Resend data

Has timer Yes


   
timed out?
 

No
 
No
Acknowledgement
 
 
received?
 
Yes
 
Transmission
complete

END
Error checking and correction
Unit 2 Communication and Internet technologies

Worksheet 2
• Complete Task 2
Error checking and correction
Unit 2 Communication and Internet technologies

Plenary
• Data transmission errors can occur owing to:
• Electrical interference
• Power surges
• Synchronisation issues
• Wear and tear on the cable or connectors

• Parity checks and checksums are two methods of


verifying that data has been received correctly
• Computers using ARQs (Automatic Repeat
Requests) will automatically return an
acknowledgement if the data was correct
Error checking and correction
Unit 2 Communication and Internet technologies

Copyright

© 2019 PG Online Limited

The contents of this unit are protected by copyright.

This unit and all the worksheets, PowerPoint presentations, teaching guides and other associated files
distributed with it are supplied to you by PG Online Limited under licence and may be used and copied by you
only in accordance with the terms of the licence. Except as expressly permitted by the licence, no part of the
materials distributed with this unit may be used, reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic or otherwise, without the prior written permission of PG Online Limited.

Licence agreement

This is a legal agreement between you, the end user, and PG Online Limited. This unit and all the worksheets,
PowerPoint presentations, teaching guides and other associated files distributed with it is licensed, not sold, to
you by PG Online Limited for use under the terms of the licence.

The materials distributed with this unit may be freely copied and used by members of a single institution on a
single site only. You are not permitted to share in any way any of the materials or part of the materials with any
third party, including users on another site or individuals who are members of a separate institution. You
acknowledge that the materials must remain with you, the licensing institution, and no part of the materials may
be transferred to another institution. You also agree not to procure, authorise, encourage, facilitate or enable any
third party to reproduce these materials in whole or in part without the prior permission of PG Online Limited.

You might also like