0% found this document useful (0 votes)
14 views

ch2 Cs

Uploaded by

Gul Yahya
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

ch2 Cs

Uploaded by

Gul Yahya
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 118

TRANSMISSION

CHAPTER 2: DATA
CHAPTER 2.1

Types and
modes of Data
Transmission
IGCSE COMPUTER SCIENCE
Do you like Computer
Science ?

YES (actually
no) :D
HOW IS DATA (TEXT, IMAGE, AND SOUND)
TRANSMITTED?

YES
!

Computer
Science
is Easy
LESSON
OBJECTIVE

Packet Packet Types of Data


Transmission
Structur Switchin
e g
Data Packets
• Data sent over long distances is usually
broken up into data packets (datagrams).
• Packet size is roughly 64KiB.
• This makes it easier to control than a long
continuous stream of data.
• Each Packet can be sent along a different
route to its destination.
Data is broken down into
packets
P1

Secret
Message P2

P3
Each packet can be sent along a different
route Any Route
P
1
Secret
Message P2 Destination

P3
One disadvantage : Data needs to be reassembled
when it reaches the destination.

P
1 Secret
Message Destination
P2

P3
Packet
Structure
P1

A typical packet is split


up into:
Header Payload Trailer
Packet Structure
(Header)
• Sender IP Address

Header • Receiver IP Address


• Sequence number of the packet.
• This is to ensure that all the packets
can be reassembled correctly once
they reach the destination.
• Size of the packet
• This is to ensure that the receiving
station can check if all of the packets
have arrived.
Packet Structure
(Header)
• Sender IP Address
Header • Receiver IP Address
• Sequence number of the packet.
• This is to ensure that all the packets
can be reassembled correctly once
they reach the destination.
• Size of the packet
• This is to ensure that the receiving
Remember station can check if all of the packets
have arrived.
Packet Structure
(Payload)
Payload
The actual data in the
packet.

“Have you done your


homework”
Packet Structure
(Trailer)
• Some ways to identify the end of the
Trailer packet. This is essential to allow
each packet to be separated from
each other as they travel from the
sending to receiving station.
Packet Structure
(Trailer)
2. Some form of error checking to

Trailer ensure packet arrives error free.


Cyclic Redundancy
• The sending computer will add up all the
Checks
1-bits in the payload and store it as a
Trailer
hex value in the trailer before it is sent.

Eg. Number of 1 Hexadecima Trailer


Payload bit l
1110100110
100 1 F F
1111010010
101 5
Cyclic Redundancy
Checks
2. Once the packet arrives, the
Trailer receiving computer recalculate the
number of 1-bits in the payload.
Trailer

Eg. Number of 1 Hexadecim


F
Payload bit al Compar
1110100110 e
100 1 F
1111010010 Does error
101 5
Packet
Structure
P
1
A typical packet is split
up into:
Header Payload Trailer
Packet Switching
• Packet switching is a method of data transmission in which
(Payload)
a message is broken up into a number of packets.
• Each packet can be sent independently from start point to
end point.
• At the destination, the packets will need to be
reassembled into their correct order.
• At each stage in the transmission there are nodes that
contain a router.
• Each router will determine which route the packet needs
to take, in order to reach its destination (The destination
IP address is used in this part of the process).
Packet Switching
• Packet switching is a method of data transmission in which
(Payload)
a message is broken up into a number of packets.
• Each packet can be sent independently from start point to
end point.
• At the destination, the packets will need to be
reassembled into their correct order.
• At each stage in the transmission there are nodes that
contain a router.
• Each router will determine which route the packet needs
to take, in order to reach its destination (The destination
IP address is used in this part of the process).
1. The router will determine the route of each packet.
2. Routing Selection depends on the number of packets
waiting to be processed at each node.
3. The shortest possible path available is always
4. Packets can arrive in a different order compared to
selected.
the way they were sent.
Benefits of packet switching

• There is no need to tie up a single communication


line.
• A high data transmission rate is possible

Drawbacks of packet switching


• Data can be lost and need to be re-sent
• Delay at the destination whilst the packets are being
re-ordered)
ACTIVITY 2.1
Discuss Activity 2.1 in groups of
4 and come up with answers!!!
Data Transmission

• There are several different methods of


transmitting data depending on the types of
hardware and connections being used.
Types of data Transmission Mode
transmission
• Simplex
• Serial
• Half-duplex
• Parallel
• Full-duplex
Data Transmission

• There are several different methods of


transmitting data depending on the types of
hardware and connections being used.

Types of data transmission

• Serial
• Parallel
Types of data transmission - Serial
• Serial data transmission occurs when data is sent ONE
BIT AT A TIME over a single wire/channel.
• Bits are sent one after the other as a single stream.

101110
Sender Receiver
01

Example : Computer is connected directly to the printer via


a USB connection.
Types of data transmission -
• Parallel data transmission occurs when SEVERAL BITS OF
Parallel
DATA are sent down SEVERAL CHANNELS/WIRES all at the
same time.
• Each channel/wire transmits one bit
1
1
Sender Receiver
1

Example : Internal circuits in a computer.


Activity time!!
Along with your peer , think of
drawbacks and benefits of each type of
Data Transmission and come up with
answers!!
Advantag Disadvantage
e
• Reliable in • Data transmission
transmitting data over can be slow as only
Serial
long distance one channel is used
• Fewer Errors

• Faster data transmission • Expensive

as multiple channels are • Synchronisation


used errors can happen due
Paralle
• Parallel data to the separation of
l transmission works well data across different
over short distances. channels
Data Transmission

• There are several different methods of


transmitting data depending on the types of
hardware and connections being used.

Transmission Mode

• Simplex
• Half-duplex
• Full-duplex
Transmission mode - Simplex

• Simplex mode occurs when data can be


sent in ONE DIRECTION ONLY (for example,
from
LAPTOP sender
TO PRINTER to receiver).

Print this page


for me
Transmission mode - Half-duplex

• Half-duplex mode occurs when data is sent in BOTH


DIRECTIONS but NOT AT THE SAME TIME (for example, data
can be sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’ along the same
transmission line, but they can’t both be done at the same
time).

"OVER OVER"

WALKIE
TALKIE "YES?"
Transmission mode - Full-duplex
• Full-duplex mode occurs when data can be sent in BOTH
DIRECTIONS AT THE SAME TIME (for example, data can be
sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’ along the same
transmission line simultaneously).

BROADBAND
INTERNET
CONNECTION
ACTIVITY TIME!!!

Think of the advantages and


disadvantages of Modes of Data
Transmission
Advantag Disadvantage
• Theeprocess can use full • Two way communication is
Simple bandwidth for the channel not possible

x
Half- • Enable two-way transmission • Delay in the
using full bandwidth communication
Duplex

• Fastest duplex transmission • Some networks are not


Full- method due to each able to utilise the
communication using its own
technology.
Duplex simplex channel. No delay
QUIZ
Which types of data transmission are being
TIME!!!
described:
data is sent one bit at a time in one direction
only
Transmission Mode
Types of data transmission

Serial Simplex

Parallel Half-duplex

Full-duplex
QUIZ
Which types of data transmission are being
TIME!!
described:
!!
data is being sent 8 bits at a time in one
direction only
Types of data transmission Transmission Mode

Serial Simplex

Parallel Half-duplex

Full-duplex
QUIZ
Which types of data transmission are being described:
TIME!!
data is being sent 16 bits at a time in both directions
!
simultaneously

Types of data transmission Transmission Mode

Serial Simplex

Parallel Half-duplex

Full-duplex
Which types of data transmission are being described:
QUIZ data is sent one bit at a time in both directions
TIME!! simultaneously
!
Types of data Transmission Mode
transmission
Serial Simplex

Parallel Half-duplex

Full-duplex
H.W ACTIVITY 2.2
Complete Activity 2.2
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
Chapter 2.2

Universal Serial
Bus (USB)
YEAR 10
Universal Serial Bus (USB)
• Universal serial bus is a form of SERIAL data transmission.

• USB is a type of communication port that has been built into


computers in order to do away with other older forms of port.

• USB is now the most common type of input/output port found on


computers and has led to a standardisation method for the
transfer of data between devices and a computer.

• USB allows both half-duplex and full-duplex data transmission.


USB Cable

• The USB cable consists of a four-wired shielded cable, with


• two wires for power (red and black)
• two wires (white and green) are for data transmission.
When a device is plugged into a computer
using one of the USB ports:

• Computer automatically detects that a device is


present (this is due to a small change in the voltage on
the data signal wires in the USB cable).

• The device is automatically recognised, and the


appropriate device driver software is loaded up so that
the computer and device can communicate effectively

• If this is not available, the user is prompted to


download the appropriate driver software
USB-C
• USB-C, is now becoming more common in
laptops and tablets/phone.

• This is a 24-pin symmetrical connector which


means it will fit into a USB-C port either way
round.

• It is much smaller and thinner than older USB


connectors, offers 100 watt (20 volt) power
connectivity, which means full-sized devices can
now be charged and it can carry data at 10
gigabits per second (10 Gbps); this means it can
Activity!!!
In groups of 2 , think of Advantages and
Disadvantages of USB and come up
with answers and complete activity 2.3
of book…
Advantages and disadvantages of USB

• Ubiquitous. It is • Data transmission


everywhere. speed is still
• Able to supply relatively slow.
power and data • Transmission
(external power
quality will
source is not
deteriorate when
needed)
the cable becomes
• Backward too long (not more
compatible as well than 5m)
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
Chapter 2.3

Methods of
error detection
Year 10
HELP!
Computers are dumb, they will detect if a message makes
sense.

Sounds good
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
synchronisation)
Five error detection methods

Parity Echo Check


Checks Check Digit

Automatic
Checksum Repeat
Request
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.
SETTING UP THE PARITY BIT - EVEN PARITY
The parity bit is set according to whether the parity being used is even or odd. For
example, consider the byte:

1 1 0 1 1 0 0
What should I put here if I want an EVEN number of 1s?

0 1 1 0 1 1 0 0
0, awesome!
SETTING UP THE PARITY BIT - ODD PARITY
The parity bit is set according to whether the parity being used is even or odd. For
example, consider the byte:

1 1 0 1 1 0 0
What should I put here if I want an ODD number of
1s?

1 1 1 0 1 1 0 0
1, Awesome!
Steps to set up a parity bit:

1 1 0 1 1 0 0
• Count the number of 1s
• Ask a question:
• Even parity: What digit should I put in the empty box if I
want an EVEN number of 1s?
• Odd parity: What digit should I put in the empty box if I want
an ODD number of 1s?
• Decide yourself based on the question!
The parity bit is set according to whether the parity being used is even
or odd. For example, consider the byte:

0 1 0 1 1 0 0
What should I put here if I want an EVEN number of
1s?

1 1 1 0 1 1 0 0
The parity bit is set according to whether the parity being used is even
or odd. For example, consider the byte:

0 1 1 1 1 0 0
What should I put here if I want an ODD number
of 1s?

1 1 1 0 1 1 0 0
Do it yourself!

1
1 1 1 1 1 0 0
)
The byte uses EVEN PARITY, what should be the parity bit?

2
1 1 0 1 0 0 0
)
The byte uses ODD PARITY, what should be the parity bit?
How is parity being used?
Message

0 1 1 0 1 1 0 0

Let’s say that


even parity
is used
Let's say the message is corrupted...

0 1 1 0 0 1 0 0

Let’s say that


even parity
is used
Something is
not right ... the
The computer will detect that an error has occurred during the transmission of byte should

the byte. The error is detected by the recipient’s computer contain even
number of 1
re-calculating the parity of the byte sent.
Do it yourself - does any error occur?

1 Message (even parity is used)

1 1 1 0 1 1 0 1
)
Message (odd parity is used)

2
1 1 1 1 1 1 1 1
)
Opps, there is a problem with parity
check ... Message

0 1 0 1 1 1 0 0

Even parity
is used
Parity check will not work if two bits are corrupted!

Message

0 1 1 1 1 1 0 1

Even parity
is used

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.
Remember: When two bits are corrupted, parity check fails.
Along with your peer complete
activity 2.4,2.5 of your book , come
up with answers!!
ACTIVITY 2.6 (BOOK)
EXAMPLES – CHECKSUM IN ACTION
Echo Check
• Upon receiving a message, the receiver will immediately
send a copy back to the sender.

• A comparison will then be carried out.

• If there is no difference between the two sets of data


during the echo check, this means that no error has
occurred.

• Otherwise, an error has occurred and the data will be


retransmitted.
PROBLEM WITH ECHO CHECK!!

As you will have no doubt worked out, this isn’t very


reliable.

If the two sets of data are different, it isn’t known


whether the error occurred when sending the data in
the first place, or if the error occurred when sending
the data back for checking.
EXAMPLES – ECHO CHECK IN ACTION
ARQ Automatic Repeat Requests

• The receiving device receives an error detection code as part of the data transmission. This is
used to detect whether the received data contains any transmission error.

• If no error is detected, a positive acknowledgement is sent back to the sending device.

• If an error is detected, the receiving device now sends a negative acknowledgement to the
sending device and requests re-transmission of the data.

• If no acknowledgement of any type has been received by the sending device within the time
limit (timeout), it automatically re-sends the data until a positive acknowledgement is
received.
EXAMPLES – ARQ IN ACTION
Check Digits
• The error detection systems described above help to spot
errors during the transmission of data between two
different devices. Sometimes, data discrepancies can occur
due to human input errors.
• an incorrect digit entered, for example 5327
entered instead of 5307
• Transposition errors where two numbers have
changed order, for example 5037 instead of 5307
• Omitted or extra digits, for example 537 instead of
5307 or 53107 instead of 5307
• Phonetic errors, for example 13 (thirteen), instead
International Standard Book Numbers

Check Digits - ISBN 13 methods


1. The check digit in ISBN 13 is the thirteenth digit in the
number.

2 . The thirteenth digit is generated using the other 12 digits


in a number. Different methods are used for different system
when calculating the thirteenth digit.
3. The thirteenth digit will help to identify whether an error
has occurred or not.
International Standard Book Numbers

Check Digits - ISBN 13 methods

• Add all the odd numbered digits together (Not the


13rd number)

• Add all the even numbered digits together and


multiply the result by 3

• Add the results from 1 and 2 together and divide


by 10
EXAMPLES – CHECK DIGIT IN ACTION
ACTIVITY!!
In the groups of 2 , Complete Activity 2.7
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S
Chapter 2.4
MAIN REASON:
PA S T Y E A R Q U E S T I O N S
PA S T Y E A R Q U E S T I O N S

You might also like