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

Chapter 2 (Data Transmission)

Uploaded by

whtet6933
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)
24 views

Chapter 2 (Data Transmission)

Uploaded by

whtet6933
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/ 58

Chapter (2)

Communication and
Internet Technology
Computer Science Department
Institute of International
Professionalism
Data Transmission
• Bit is short for binary digit, it is the smallest unit of
data in a computer.
• Bit rate is the rate at which data is transferred.
• This is the number of bits that can be transmitted in a
given period of time.
• Bit rate is measured in bits per second(bps) or now
more commonly in megabits per second(Mbps).
Types of data
transmission

Serial data Parallel data


transmission transmission
Serial Data Transmission

• Uses a single wire to transfer the data bits.


• The bits are transmitted sequentially, one bit at a time.
• There is a set time interval between sending each it.
• The time interval depends on the speed of the
transmitting and receiving devices.
• A single wire is cheap to build and can transmit data
over long distances, up to 100 meters.
• Eg: Microphone, Keyboard, Doll bell
Serial Data Transmission
Device 1
Device 2
10011001

Device 1 Device 2
1001 1

Device 1 Device 2
01 100

Device 2
Device 1
10011001
Parallel Data Transmission

• Uses several wires to transfer the data bits


simultaneously.
• For example, with eight wires, 1 byte (8 bits) could
be transmitted all at once.
• Parallel transmission transfers data quicker than
serial transmission.
• There are more cables in parallel transmission, so
more expensive and it therefore limited to shorter
distances of around 5 meters.
Parallel Data Transmission

Device 1
Device 2
10011001

Device 2
Device 1
10011001
Parallel Data Transmission

• For many years, parallel transmission was used for data transfer
between computers and printers. This is because printers needed
data quickly and were generally placed next to computers.
• Today, parallel transmission has largely been replaced by high-
speed serial transmission methods such as the Universal Serial Bus
(USB), which transmits data much quicker than parallel
transmission.
• USB connect electronic devices to a computer, e.g: mobile phone
and tablet devices, keyboard and mouse, USB also used in storage
devices like USB flash drive.
• This is a small portable storage device and can be used to transfer
the data from computer to the storage device and vice versa.
Parallel Data Transmission

• Parallel transmission is used in simple computers


such as integrated circuits (IC) where low costs.
• IC used to create microprocessors such as, washing
machine or a microwave.
• In order for any data to be sent by serial
transmission it needs to be converted. Data is
converted from parallel to serial at the sender’s
side, to be transmitted over a single wire. It is then
converted back from serial data to parallel to be
processed by the receiver’s device.
Serial and Parallel Transmission

Serial Transmission Parallel Transmission


Used over long distances Used over short distances
Uses a single wires Uses multiple wires
Reduced costs as only single wire Increased costs as multiple wires
needed needed
Slower transmission as data is Quicker transmission as data is
only transmitted one bit at a time sent simultaneously over multiple
over a single wire wires
Safer transmission as it is easier to Less safe transmission as bits are
accurately collate the bits sent simultaneously and errors
together as they are sent one at a can occur in collating them
time. together at the receiver’s side
ASYNCHRONOUS DATA TRANSMISSION

• Data being transmitted in an agreed bit pattern.


• Data bits (1s and 0s) are grouped together and sent
with CONTROL BITS:
• The control bits allow the receiver to know when
the data starts and ends.
• The control bits prevent the packets of data
getting mixed up
• Slower than synchronous
Start Bit 1 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 Stop Bit
SYNCHRONOUS DATA
TRANSMISSION
• Continuous stream of data
• The data is accompanied by timing signals (generated
by an internal clock)
• The clock ensures the sender and receiver are in
step with each other
• The receiver counts how many bits were sent over a
period of time then reassembles them
into bytes (multiple bytes sent at once)
• Timings have to be accurate as there are no control bits
• Faster than asynchronous
SYNCHRONOUS DATA
TRANSMISSION
Universal Serial Bus
• Universal serial bus (USB) is a form of serial data
transmission.
• 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.
• It is important to note that USB allows both half-
duplex and full-duplex data transmission.
Universal Serial Bus

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


with two wires for power (red and black).
• The other two wires (white and green) are for data
transmission.
Universal Serial Bus
(USB)
• An asynchronous serial data transmission method.
• USB allows for the automatic detection of plugged
in devices, and the automatic loading the device
drivers if available.
• USB has become the industry standard connection
type and therefore widely available and used.
• They are easy to work with as they cannot be
connected incorrectly as the plug only fits in one
way.
Universal Serial Bus
(USB)
• As the technology improves, newer versions of USB
with faster transmission speeds are becoming
available.
• New versions of USB are backward compatible with
the older specifications.
• A flash drive stores data using flash memory. Flash
memory uses an electrically erasable
programmable read-only (EEPROM) format
to store and retrieve data.
Benefits Drawbacks

Devices plugged into the computer are Standard USB only supports a maximum
automatically detected and device Cable length of 5m; beyond that, USB hubs
Drivers are automatically loaded up are needed to extend the cable length

Connections can only fit one way preventing Even though USB is backward compatible,
incorrect connections being made Very early USB standards (V1) may
Not always be supported by the latest
It has become an industry standard, which Computers
means considerable support is
Available

Can support different data transmission rates Even the latest version 3 (V3) and version
(from 1.5mbps to 5gbps) 4 (V4) USB-C systems have a data transfer
Rate which is slow compared to, for
USB protocol notifies the transmitter to re- Example, ethernet connections (note: USB
transmit data if any errors are V2 has a maximum data transfer rate of
Detected; this leads to error-free data 480mbps.)
transmission

It is relatively easy to add more USB ports if


necessary, by using USB hubs
USB is backward compatible (that is, older
versions are still supported)
Transmission
mode

Simplex Half-duplex Full-duplex


mode mode mode
Simplex transmission

• Data is sent in one direction only.


• E.g: television broadcast, microphone, keyboard,
Door bell

Device 1 Device 2
Data sent in one direction
Full duplex transmission

• Data is sent in both directions at the same time.


• E.g: telephone conversation, skype, messenger

Device 1 Data sent in both directions at the same time Device 2


Half-duplex transmission

• Data is sent in both directions but only one


direction at a time.
• E.g: walkie-talkie, viber

Device 1 Device 2

Data sent in both directions but only


one direction at a time

Device 1 Device 2
Data Packets
• Data sent over long distances is usually broken up into
data packets (sometimes called datagrams).
• The packets of data are usually quite small, typically 64
KiB, which are much easier to control than a long
continuous stream of data.
• The idea of splitting up data in this way means each packet
can be sent along a different route to its destination. This
would clearly be of great benefit if a particular
transmission route was out of action or very busy.
• The only obvious drawback of splitting data into packets is
the need to reassemble the data when it reaches its
destination.
Packet structure
• A typical packet is split up into:
 A packet header
 The payload
 A trailer
Packet Header
• The packet header consists of:
 The IP address of the sending device
 The IP address of the receiving device
 The sequence number of the packet (this is to
ensure that all the packets can be reassembled
into the correct order once they reach the
destination)
 Packet size (this is to ensure the receiving station
can check if all of the packets have arrived
intact).
Payload
• The payload consists of the actual data being sent
in the packet (this is usually about 64 kib).
Packet Trailer

• Some way of identifying the end of the packet


• An error checking method
Cyclic Redundancy Checks
(CRCs)

• Cyclic redundancy checks (CRCs) are used to check data


packets:
• This involves the sending computer adding up all the 1-bits
in the payload and storing this as a hex value in the trailer
before it is sent
• Once the packet arrives, the receiving computer
recalculates the number of 1-bits in the payload
• The computer then checks this value against the one sent
in the trailer
• If the two values match, then no transmission errors have
occurred;
• Otherwise the packet needs to be re-sent.
Process Of Packet
Switching
• Data is broken down into packets
• Each packet could take a different route
• A router controls the route a packet takes
• Packets may arrive out of order
• Once the last packet has arrived, packets are
reordered
Packet Switching
Order
• each packet will follow its own path (route)
• routers will determine the route of each packet
• routing selection depends on the number of
packets waiting to be processed at each node
• the shortest possible path available is always
selected – this may not always be the shortest path
that could be taken, since certain parts of the route
may be too busy or not suitable
• unfortunately, packets can reach the destination in
a different order to that in which they were sent.
Packet Switching
Paths
Benefits Of Packet
Switching
• There is no need to tie up a single communication
line
• It is possible to overcome failed, busy or faulty lines
by simply re-routing packets
• It is relatively easy to expand package usage
• A high data transmission rate is possible.
Drawbacks Of Packet
Switching

• Packets can be lost and need to be re-sent


• The method is more prone to errors with real-time
streaming (for example, a live sporting event being
transmitted over the internet)
• There is a delay at the destination whilst the
packets are being re-ordered.
Method of Error
detection and correction
 Errors can occur during data transmission due to
interference, e.g. data loss, data gain and data change
 Method of Error detection and correction to increase
the accuracy and reliability of the data.

 Checksum
 Parity Check
 Check Digits
 Echo check.
 Automatic repeat request (ARQ)
Checksum
• A check sum is a simple method of error detection.
• The number of bits being transmitted is counted up
and this numeric count is transmitted with the data.
• The receiver can then see if the same number of
bits has arrived.
• If the counts match then the receiver knows a full
transmission of the data has been received.
Checksum
• 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.
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.
Parity Check
• 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.
Parity Check
• Data is sent in bytes, the first 7 bits of the byte are the data itself, the last bit
is the parity bit.
• A parity check can use odd parity or even parity.
• All the bits are added together in the byte and depending on whether odd
or even parity is being used a 1 or 0 will be added as the finally parity bit.
• For example: 1001100, using an even parity check, the parity bit would be a
1:
• Using an odd parity check, the parity bit would be a 0
• The device will be sent to check for even or odd parity before the data is
sent.
• Sometime, it can not detect the transmission error because the
transposition error or the bits themselves have changed still add to even
number.
• Eg: 1001100 is being sent using even parity, parity bit is 1 and arrived as
110100 with the parity bit is also 1. So there is no error would be detected.
Check Digits
• A check digit is a method of error detection that is
used on identification numbers such as barcodes, ISBNs
(International Standard Book Number)
• It is used to detect human error when entering these
numbers.
• A calculation is performed using the digits in the
identification number and a check digit added to the
end of the number as a result.
• The computer will perform the same calculation and
compare the result to the check digit.
• If the two match, it knows the number is correct.
Check Digits
• A check digit is the final digit included in a code; it
is calculated from all the other digits in the code.
• Check digits are used for barcodes on products,
such as International Standard Book Numbers
(ISBN) and Vehicle Identification Numbers (VIN).
• Check digits are used to identify errors in data entry
caused by mis-typing or mis-scanning a barcode.
Check Digits
• They can usually detect the following types of error:
• 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 of 30 (thirty).
ISBN 13
• The following algorithm generates the check digit from
the 12 other digits:
1. add all the odd numbered digits together
2. add all the even numbered digits together and
multiply the result by 3
3. add the results from 1 and 2 together and divide by
10
4. take the remainder, if it is zero then use this value,
otherwise subtract the remainder from 10 to find
the check digit.
• Using the ISBN 9 7 8 0 3 4 0 9 8 3 8 2
ISBN 13
• To check that an ISBN 13-digit code is correct,
including its check digit, a similar process is followed:
1. add all the odd numbered digits together,
including the check digit
2. add all the even number of digits together and
multiply the result by 3
3. add the results from 1 and 2 together and divide
by 10
4. the number is correct if the remainder is zero.
• Using the ISBN 9 7 8 0 3 4 0 9 8 3 8 2 9
Modulo-11
• The following algorithm generates the check digit from the other 7
digits:
1. each digit in the number is given a weighting of 8, 7, 6, 5, 4, 3 or 2
starting from the left (weightings start from 8 since the number
will become eight-digit when the check digit is added)
2. the digit is multiplied by its weighting and then each value is
added to make a total
3. the total is divided by 11
4. the remainder is then subtracted from 11 to find the check digit
(note if the remainder is 10 then the check digit ‘X’ is used).
5. the following seven-digit number:
• 7-digit number: 4 1 5 6 7 1 0
• weighting values: 8 7 6 5 4 3 2
Modulo-11
• To check that the eight-digit number is correct,
including its check digit, a similar process is followed:
1. each digit in the number is given a weighting of 8, 7,
6, 5, 4, 3, 2 or 1 starting from the left
2. the digit is multiplied by its weighting and then
each value is added to make a total
3. the total is divided by 11
4. the number is correct if the remainder is zero
• Using the 8-digit number: 4 1 5 6 7 1 0 2
• weighting values: 8 7 6 5 4 3 2 1
Echo check

• When data is sent to another device, this data is


sent back again to the sender.
• The sender’s computer compares the two sets of
data to check if any errors occurred during the
transmission process.
Echo check

• A copy of the data is sent back to the sender


• The returned data is compared with the original
data by the sender’s computer
• If there are no differences, then the data was sent
without error
• If the two sets of data are different, then an error
occurred at some stage during the data
transmission.
Echo check

• 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.
Automatic Repeat
Request (ARQ)
• Automatic repeat request (ARQ) is a set of rules for
error control when transmitting data.
• When the device receiving the data detects there is
an error with a packet, it automatically sends a
request to the device transmitting the data to
resend the packet.
• This resend request will be sent repeatedly until the
packet is received error free or a limited amount of
resend request is reached.
Automatic Repeat
Request (ARQ)
• ARQ uses positive and negative acknowledgements and timeout
the receiving device receives an error detection code as part of
the data transmission (this is typically a Cyclic Redundancy Check)
• 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
• time-out is used by the sending device by waiting a pre-
determined amount of time
• if no acknowledgement of any type has been received by the
sending device within this time limit, it automatically re-sends
the data until a positive acknowledgement is received
• ARQ is often used by mobile phone networks to guarantee data
integrity
Encryption
• To protect the data is to convert it into a form that cannot be
understood by anyone other then and authorized user. This
process is called “Encryption”.
• The plain text changes to cipher text
• The original data being sent is known as plaintext. Once it
has gone through an encryption algorithm, it produces
ciphertext.
• It prevents the data being understood by unauthorized user
if it is accessed.
• Encryption works by using a key.
• A key is a particular piece of information that describes how
a message is unencrypted or decrypted.
• To make it more difficult for an unauthorized user to decrypt
a message used a long key, more than 128 bits.
• Use extremely complex algorithm and keys
Encryption
Example of Encryption

A word is shifted across the alphabet +4, +2, +9, +1, and so on, places
Example of Encryption
• The cipher works by taking each letter in the alphabet and replacing
it with another letter several positions up or down the alphabet.
• The number if position is called the offset.
• In this method the offset is the key.
• For example

Plain A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
text

Offset=4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D

I LOVE COMPUTER SCIENCE

M PSZI GSQTYXIV WGMIRGI


Symmetric or
Asymmetric
• Encryption can be symmetric or asymmetric.
• In symmetric encryption, the same key is used to encrypt and
decrypt the message.
• The problem with this method is that anyone who obtain the key can
encrypt or decrypt the over the.
• Sending the secret key over the internet causes a serious security risk
– a hacker could intercept the key and decrypt the ciphertext data
too!
• In asymmetric encryption uses two keys that work as a pair.
• The first key is used to encrypt the message. A message encrypted
with the first key cannot be decrypted with that same key.
• Decrypted with the second key.
• Similarly, a message encrypted with the second key can only be
decrypted with the first key.
Public key and Private
key
• The key from the sender is called Public Key. Public key (made
available to everybody)
• The key that kept secret by the user is called Private Key. Private
key (only known to the computer user).

For example

Private Key Public Key


Encrypt Decrypt
Bank User

Decrypt Encrypt
Private Key Public Key
Thank You !!

You might also like