0 ratings 0% found this document useful (0 votes) 7 views 19 pages Session 4
The document provides an overview of Universal Serial Bus (USB) technology, detailing its power and data connections, automatic device detection, and error checking methods. It discusses various error detection techniques, including parity checks, checksums, and echo checks, and explains how data transmission can be affected by errors. Additionally, it covers the importance of USB in device connectivity and the limitations of cable length and transmission speed.
AI-enhanced title and description
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Universal Serial Bus
Black: Power (ground)
White: Data (-) Red: Power (+5V)itis a simple interface. The USB cable to device can
only fit into the USB one way. Therefore, it means less
errors in connecting devices are likely to be made.
The length of a USB cable is limited, normally to
5 metres,
The speed of a USB connection is relatively high, so
data can be transferred quickly.
The USB interface is a universal standard for
connecting devices, therefore a USB port is included
in many different devices.
When a USB device to cable is inserted into a USB.
port, itis automatically detected. The first connection
will normally involve the download of drivers to
operate the hardware that has been connected. Each
connection after this the driver should not need to be
downloaded again
"A.USB connection can also be used to power a
device, so it does not need another power source. It
can also use this to charge a device, such as a mobile
phone.
The transmission speed is relatively high for a USB
connection, but it isn’t as high as other types of
connection, such as ethernet,Sse Fs Ss FS ss
erry
USBTypeA USBTypeB -USB3,0 -—-USBMini +‘ USBMicro USBTypeC USB MicroB
-—@ 0
—@The need for error checking | 1 wil
“With the complexity of computers and the vast amounts of 1s and 0s being transmitted, there is always a possibility that
data can be lost, gained or changed along the way.
1100 000 00101
1 011 111
regs Cee
Issues during the packet switching
Peeters. ind
or in some cases, gained.
a ake ee
ene ou ieee
Peete tei’
lost or corrupt ~i.e., 1s become
TeesWhen data is transmitted, there is always a possibility that data can be lost, gained or changed.
The most common reasons for data corruption are:
+ Electrical interference (noise)
+ Problems during packet switching
Common methods of error checking include:
+ Parity checks
+ Checksums
+ Echo checks
+ Automatic Repeat Query (ARQ)Parity checks (odd and even)
Computers submit data in bytes. As we know, a byte is 8 bits.
In this method, the Most Significant Bit (MSB) is reserved and used as a parity bit.
We can use either odd or even parity.
The parity bit is set to either 0 or 1 so that the total number of 1s in the byte is either odd or even.
Parity bit
ow
oat fo fafojo}s]ojo|
senpenny fol{ajofol1]|o|o|Parity checks (odd and even)
Standard ASCII characters store letters in 7 bits and do not make use of the Most Significant Bit (MSB), so it can potentially
be turned into a parity bit.
G sent using 1
even parity
Parity bit Character code for 6
G sent using 1
odd parity
Parity bit Character code for GParity block checks
We have seen how parity can be used to detect an error in a single byte of data.
However, the position of the error cannot be worked out.
A byte of data being sent using odd parity with a single error
jo]+]o Me: |olo|X
Parity bit Data
Our only option is to ask for the data to be sent again.
However, if we send multiple bytes as a transmission block, not only can we spot that an error has occurred, but it can
also be identified - and corrected by performing both horizontal and vertical parity checks on the whole block of data.Parity block checks
feb ebl eel er
US SEEEEEEEEEELELEE
HEE EEEEECeEEebeee
gals|s slals[ele[slelslelelsParity block checks
1
2
3.
4.
Using even parity, a message is sent as
a block of 8-bit bytes.
A horizontal parity check is performed
on each byte, which identifies an error
in one of the bytes.
Additional vertical parity checks are
performed on the whole block.
The error can now be identified and
corrected without having to ask for the
data to be re-sent.
LKR SS SE KK SSK
‘Actual message received
0
°Checksums
1, Before the data is transmitted, a checksum must be calculated and added to the end of the block of data. The checksum
is calculated from the block of data based on a pre-agreed algorithm.
2. The data, along with the checksum, can now be transmitted.
3. The receiving device uses the same pre-agreed algorithm to recalculate the checksum.
4, The re-calculated checksum is compared to the original checksum. If the two checksums are the same, itis assumed
there are no errors. Otherwise, a request to re-send the original data is sent.Echo check
1. Data is transmitted to the destination device.
2. The destination device returns a copy of what it received back to the sender.
3. The returned data is compared with the original data. If they are different, that means an error has occurred
at some stage, and the data is re-sent.
‘The problem with this approach is that if the two sets of data are different, there is no way to tell whether the
‘error o:curred when sending the data or when it was returned for checking.
_A_ _A_
Source DestinationError detection methods
Parity checks
‘+ When sending a byte of data, we can use the Most Significant Bit as a parity bit.
+ With even parity, we set the MSB to be 1 or 0 so that the total number of bits ~ including the parity bit ~ is even.
* With odd parity, we set the MSB to be 1 or 0 so that the total number of bits - including the parity bit ~ is odd.
+ With this method, simple errors can be spotted, but there is no way to tell exactly where the error occurred.
Parity block checks
+ When sending a block of data, parity checks can be performed both horizontally and vertically on the whole block.
‘+ These checks can spot that an error has occurred and where, allowing the receiving device to fix the error.
Checksums
+ Achecksum is calculated by using an algorithm on the data to be transmitted
+ This checksum is added to the transmission and sent along with it.
+The receiving device re-calculates the checksum and compares the new one with the original.
+ Ifthe checksums do not match, itis assumed that an error has occurred
Echo check
‘+The receiving device returns an exact copy of the data it has just received.
‘+The data is compared to what was originally sent. If its different, itis assumed that an error has occurred, and the
original data is re-sent.(i) Another method of error checking is party block check
The table shows 7 bytes that are transmitted using odd parity. The party bit has been
‘completed for each byte,
Complete the panty byte for the data
party we7 | one | wits | oie | os | ot2 | wit
Eg
a3. The binary number 10100011 is stored in random access memory (RAM).
A logical left shift of three places is performed on the binary number.
(a) Give the 8
binary number that will be stored after the shift has taken place.
- (1)
(b) Tick (7) one box to show which statement about a logical left shift of two places is correct.
‘A It would divide the binary number by 2.
B It would multiply the binary number by 2.
It would divide the binary number by 4.
D__ It would multiply the binary number by 4
1
(¢) 10100011 can be stored as a two's complement integer.
Convert the two's complement integer 10100011 to denary. Show all your workingData is encrypted to keep it safe during transmission.
Complete the paragraph about asymmetric encryption,
Use the terms from the list.
Some of the terms in the list will not be used. You should only use a term once.
asymmetric certificate cipher text
decrypted encrypted parallel key plain text private key
protected public key serial key symmetric
.. i encrypted into
using a The encrypted data is then transmitted from the
sender to the receiver. The encrypted data is then decrypted using a
(4)(©) Computer A needs to be directly connected to a router that is located ina diferent room.
{) Tick (¥) one box toidentfy whether serial data transmission or parallel data transmission
|s more suitable for this connection.
Explain the reasons for your choice.
Serle tanemsson |
Parallel data transmission
Reasons for your choice
io}
(i) The connection wil also use ful-cuplox data transmission
Define ful-duplex data transmission,(6) The data vansmission will use party checks,
{The bytes need tobe sont using an even panty byte check
Complete te panty bit foreach byte.
Party
be
ByteA 1} 1)0/)0)0
Bytes O) 0 |o | 0 | 0
(i) Aparty block check canbe used instead ofa panty byt check
ea
Explain how a party block check might detect an eor in transmission that would not be
‘detected by a parity byte check(iy Ta aan senting ah een pasty ck. Othe is as ben tanta
Doves
Pacty
eof sf tt al slo ao
emtfo}o + a)o}1 oo
ema} 1 }o + 1+ |ol}o «|
ews} sft oo ols) a 4s
emal 1 | o 1 0 |o)o 1) 0
ews} o | o 0 o|o) 0 « 0
ewelo f+ 1 1] +) 0 «| o
rato fsa lols) ols) o
ently be be nant ah te nurbr af he nerd BL
tmnt
@