Chapter 2 (Data Transmission)
Chapter 2 (Data Transmission)
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
Device 1 Device 2
1001 1
Device 1 Device 2
01 100
Device 2
Device 1
10011001
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
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
Device 1 Device 2
Data sent in one direction
Full duplex transmission
Device 1 Device 2
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
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
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
For example
Decrypt Encrypt
Private Key Public Key
Thank You !!