IGCSE Computer Science - 2210 - Chapter 2
IGCSE Computer Science - 2210 - Chapter 2
SCIENCE
Theory of Computer Science – Communication
Outlines
■ Data transmission
– Simplex, half and full duplex
– Serial and parallel
– Synchronous and asynchronous
– Universal serial bus and its types
■ Error handling
■ Networks
– Intranet
– Internet
Communication, Networks and Internet
■ Communication in computers:
– Happens on different levels, from internal components to networks
– Follow certain standards or protocols
■ A Network is a collection of computers, which follow communication principles to
share resources
■ Internet is the global network of computers
Data transmission
■ In full-duplex transmission, both parties can send and receive data simultaneously
■ Examples:
– Telephone
– Chatting
– Video conference
Data transmission – Serial
■ In synchronous transmission, the bits are sent as a continuous stream of large data blocks
■ The size of data blocks is not fixed. The time interval of transmission is fixed
■ Predefined clocking determines the beginning and end of data arrival
■ The receiver receives data over a specific time and then combines all the bits in form of
bytes
■ Optimized for continuous streaming on low bandwidth, because no bit overhead is
required
■ Examples:
– Voice chat
– Video streaming
Data transmission – USB
■ Universal Serial Bus is among one of the most adopted technologies, which uses a
common standard for most data transfers
■ A USB port (or connector) has 4 lines (2 for power and 2 for data transmission)
■ Data transmission is asynchronous
■ When a devices is connected to computer using USB port, computer detects a small
change in voltage and establishes connection with the device
■ Since most USB devices follow same standard, therefore they are compatible with most
computers and operating systems
■ There are 3 different types and 4 versions of USB. The type represents USB connector’s
physical appearance, while version represents speed of transfer
Data transmission – USB
■ Type A connector is the oldest one and
becoming obsolete
■ Type B is widely used in printers and
scanners
■ Type A/B mini were used in older portable
devices like tablets and MP3 players
■ Type A/B micro is widely used in latest
smartphones
■ USB 3 Type B Micro is used in portable
drives and external DVD
■ USB 3 Type-C is the latest of all:
– It is the fastest
– Can be plugged both ways
– Both ends of the cable are same (i.e.
male)
Data transmission – USB
■ Data transmission error means loss of data during transportation from sender to receiver
■ Data is considered erroneous if the bits received and bits sent are sent are not exactly
same
■ Error during transmission may occur due to various factors like voltage drop, electric
resistance, physical damage in transmission lines, and incompatible software/hardware.
Data transmission – Error handling
■ There are four main techniques to identify whether an error occurred during
transmitting data:
– Parity check
– ARQ (Automatic Repeat reQuest)
– Checksum
– Echo
Data transmission – Error handling
Parity check
■ Parity check is a simple technique to detect whether data is received correctly or not.
■ In each data packet, a bit is reserved to tell the receiver whether the number of bits in
the packet is Odd or Even.
■ For example, if a sender is sending a value 1 1 1 0 0 0. Then a parity bit is added at the
end of the value:
– If the parity bit is checking “Even” number of bits, then a bit with value 1 will be
appended: 1 1 1 0 0 0 1. This will tell the receiver that the number of 1 bits should
be even.
– If the parity bit is checking “Odd” number of bits, then a bit with value 0 will be
appended : 1 1 1 0 0 0 0. This will tell the receiver that the number of 1 bits should
be odd.
Data transmission – Error handling
Parity check
■ Checksum is a small value, which is calculated from a data packet using a checksum
function (a.k.a. checksum algorithm).
■ The sender sends the data package as well as a checksum value to the receiver.
■ The receiver receives data and calculates the checksum again. If the checksum does not
match with the sender’s checksum, then there is some error in the data received.
■ There are many checksum algorithms like longitudinal redundancy check, modular sum,
Luhn algorithm, etc. We can create our own functions as well.
■ For example, calculate the sum of all 1’s on Odd positions and all 1’s on Even positions.
Data transmission – Error handling
Checksum
■ Another example, let’s say you want to send a hand written letter to your family. The
letter says:
Assalamu alaekum brother, the bearer of this letter is my business partner. Please give
him 6000 (Six thousand) rupees on my behalf. I will return to you when I come back
home tomorrow in sha Allah.
Allah hafiz. Your Big B
■ Say the carrier of this letter tries to be creative and changes Six to Sixty and adds
another zero to the number 6000.
■ How would your brother know if the letter was fabricated?
■ Checksum could be an answer. Say you and your brother both agree that whatever
written conversation you have with each other will have a checksum to ensure
correctness.
Data transmission – Error handling
Checksum
■ This technique is very simple. The sender transmits data and receiver receives it. Once
the data is received completely, it is sent back to sender. The sender then compares it
with original data to see if both copies are same.
■ There are two problems with this method:
– It has an overhead of the data size
– It is unreliable
Networks