Data Transmission
Types and Methods
Wired Connections
There are 2 ways data can be transmitted in terms of bits and wires.
- Serial: bits are transmitted one by one along a single wire
- less likely to experience interference means data is less likely to have errors
- can be used for longer distances
- bits do not have to be reordered
- Parallel: multiple bits are transmitted simultaneously across multiple wires
- faster transmission than serial
- unlikely to skew when the connection is a short distance
Skewing occurs when bits travel at different speeds and arrive out of sync. This is only a problem with parallel data transmission.
There are 3 methods that determine the direction of data transmission.
- Simplex: data transmission only occurs in one direction from the transmitter to the receiver
- Half-Duplex: data can be transmitted and received by both sides but both sides can't transmit data at the same time
- Full-Duplex: data transmission can occur in both directions simultaneously
USB
The Universal Serial Bus is an asynchronous and serial method of transmitting data between devices and has become an industry standard.
Using a USB is a common way of transmitting data from peripherals like keyboards, mice, and printers to personal computers. When a device is connected to a USB port, the computer automatically:
- detects that the device has been connected
- recognises the device and loads the appropriate device driver so that the device can communicate with the computer
Advantages and Disadvantages
- Devices plugged into the computer are automatically detected and device drivers are automatically loaded up
- Maximum cable length is roughly 5 metres meaning it cannot be used over long distances
Data Packets
TCP stands for Transmission Control Protocol and allows programs and computers to exchange information over a network. Information is broken down into packets before transmission because smaller chunks of data are easier and quicker to route than large chunks of data.
Data transmitted over the internet can include any media such as text, images, audio, video, markup, or a combination of theses.
Packet Structure
The information stored in a data packet is called the payload.
Like any letter, email, or parcel, packets have 3 main components.
- From: Source IP Address
- To: Destination IP Address
- Content: Payload
Packets are split into 3 parts.
- Header
- Payload
- Trailer
The header contains metadata about the packet and adds context to the payload.
- Source IP
- Destination IP
- Packet Number
Packet Switching
A router controls the route a data packet takes. Data packets usually take the most optimal route (path). Packets may arrive out of order or through different routes. This means the packets need to be reordered once the last packet arrives.
- Data is broken into packets
- A router controls the route a packet takes
- The fastest available route is selected
- Packets may arrive out of order
- Packets are reordered once the last packet has arrived
- Any missing or corrupted packets are requested to be resent
Packet switching has many advantages.
- Interference and corruption are minimal since individual packets can be resent instead of the whole file
- Resending only corrupted packets can save time and bandwidth compared to resending an entire file
Error Detection
Parity Check
Parity checks can come in 2 forms:
- parity bit
- parity byte
The sender and receiver must agree on odd or even parity before transmission. A parity bit is added to the data to make sure that the number of 1
digits is even or odd
Parity | Data | Parity Bit | Final Value |
---|---|---|---|
Even | 0000000
| 0
| 00000000
|
Even | 1111111
| 1
| 11111111
|
Odd | 0000001
| 0
| 00000001
|
Odd | 1010101
| 1
| 11010101
|
A parity block is of a block of data containing a parity byte.
- Each byte (row) has a parity bit
- Parity byte has a parity bit for each bit (column)
- Parity byte is sent with the data
The resulting parity block can be displayed as a table of bits with each row representing a byte and each column representing a specific bit form each byte.
Unlike parity bits, parity blocks can locate the erroneous bit.
Checksum
A checksum can determine whether data has been corrupted but it does not reveal where the error has been made. A checksum is calculated once by the sender and once by the receiver.
- Sender and receiver agree on checksum algorithm
- Sender calculates a value from the data
- Value is sent along with data
- Receiver recalculates value
- Error has occurred if both values are not equal
- Receiver requests for the data to be resent
Check Digit
A check digit validates data on data entry. Check digits are used in:
- bar codes
- international standard book numbers
Check digits work by calculating a value based on digits in the data. This value is often a digit or a letter which is appended to the end of the data.
ARQ
An automatic repeat request sends data in a loop until the sender receives a confirmation message. It does not check for errors and relies on other error checking methods to function effectively.
- Sender and receiver agree on a certain error checking method
- Sender transmits calculated value along with data
- Receiver checks or recalculates value
- Receiver sends acknowledgement if no errors have been found
- Receiver requests resend if an error is found
- Sender resends data until receiver sends an acknowledgement
This method notably involves the use of positive or negative acknowledgements and timeouts.
Echo Check
An echo check is when the receiver transmits a copy of the data back to the sender. The sender checks whether the data received is the same as the data that was sent before. Echo checks are often regarded as ineffici