Unit 2 Flashcards
Methods of data transmission
Serial:
- Bits are transmitted one at a time over a single wire
- Bits arrive in order
- Cheaper than parallel (only one wire)
- Used over long distances (because of reasons above)
Parallel:
- Multiple bits are sent simultaneously over multiple wires
- Faster than serial transmission
- Bits may arrive out of order
- Expensive (multiple wires)
- Used over short distances (between computer components that transmits large amount of data and where data is needed as fast as possible)
Types of data transmission
TYPES OF DATA TRANSMISSION
Simplex data transmission:
- Data moves in one direction only
- One device sends and one receives
Half-duplex:
- Data moves in both directions but not at the same time
- Kinda like walkie talkies
Full-duplex:
- Data moves in both directions simultaneously
USB
UNIVERSAL SERIAL BUS
- A communication interface connecting devices to their host controller
- Uses serial transmission
- Many USB cables only transfer data in one direction, but the new USB-C can transfer data in both directions
Advantages:
- Back-wards compatible (universal standard)
- Can transfer power and data
- Cheap
Disadvantages:
- Slow data transfer speeds (compared to ethernet)
- Limited distance (max 5 metres)
You must distinguish between a USB device, a USB cable and a USB port:
- A USB device (such as a flash drive) plugs directly into a USB port.
- A USB cable is used to connect a separate device into a USB port.
Parity check
A parity check is one of the methods used to check for data transmission errors. Data is usually stored or transmitted in bytes.
A parity check involves using a parity bit at the end or start of the binary number and sent along with the data.
There are:
- even parity check (checks the total number of 1s is even)
- odd parity check (checks total number of 1s is odd)
1011 0101 (This is odd parity)
1001 0101 (This is even parity)
The sending and receiving computers must both agree on which parity to use – even or odd.
Limitations:
- It cannot tell us which bit has been corrupted or changed during transmission
- Transposition errors cannot be detected (0 changes into a 1 and vice versa, the bits change positions; even number of bits change)
Parity block
A parity block uses the same rules as for normal parity checks, odd or even, but takes a set of binary numbers and arranges them in a table, so that a parity bit is used in each row and each column.
A parity block consists of the data block and the parity byte.
(A parity block consists of a parity byte which can be added to the data to show exactly which bit is in error).
Checksum check digit
A checksum is another type of error detection method.
1. Data is sent in blocks along with the calculated checksum
- The receiving computer performs the same checksum calculation on the received data
- The receiving computer compares the received checksum with the checksum it has calculated
- If the checksums match, the data is considered error-free
- If the checksums do not match, this indicates an error occurred during transmission - The receiving computer then requests the sending computer to resend the data if there’s a mismatch
- This process is repeated until the correct data is received.
A check digit is an extra digit added to a number that is calculated from the existing digits in the number.
It is used to check for errors during data entry. Check digits can easily detect incorrect digits, transposition errors, extra digits or omitted digits in a number.
Examples of uses of check digits include the International Standard Book Number (ISBN), product codes, barcodes and Vehicle Identification Numbers (VIN).
You can use different algorithms to calculate a check digit or confirm that no error occurred during transmission. If the check digit matches your result, it means there are no errors!
Echo check
An echo check is a method of error detection where the receiving computer sends back an exact copy of the data to the sending computer.
The sending computer then compares the data it originally sent to the data it has received back. If there is a match between the two data sets, then the transmission took place without error. If there is an error, the sending computer resends the data, and the process starts all over again.
The disadvantage:
- It is difficult to tell whether the data was corrupted in transit to the destination or on its way back.
- Speed, because the complete data must be sent twice.
Packet switching
A packet is a small unit of data that can be transmitted from a sending device to a receiving device via a network communication protocol.
A packet consists of 3 parts:
- Header (Sender/receiver’s IP address, packet number, protocol)
- Payload (a small part of the actual data being transmitted)
- Trailer (indicates the end of packet)
Packet switching:
1. Data is broken down into packets
2. The packets take different routes
3. The router decides which route the packets will take based on the efficiency of the routes and availability
4. Packets may arrive out of order. When the last packet arrives, it is rearranged in order based on their packet number
5. If the packets go missing the router can identify the error and ask for the data to be resend.
Advantages – packets take different routes so faster; transmission errors can be detected when they occur
Disadvantages – one packet being delayed delays the whole process because it has to be resent
ARQ
An automatic repeat query (ARQ) is the set of rules established between a sending computer and the receiving computer to control errors. Regardless of the error checking method used, if the receiving computer detects an error, it can request the sending computer to resend the packet (not an error detection method).
When data is received at the destination computer, the computer sends a short message known as an acknowledgement (ACK). An acknowledgement indicates whether the transmission was successful or not.
A positive acknowledgement suggests that transmission was completed without error, while a negative acknowledgement indicates that transmission had some errors.
In the case of a negative acknowledgement, the receiving computer will request the sending computer to resend the data. This process is repeated until the receiving computer receives the complete packet, or until a time out (defined fixed time).
If the sender does not receive an acknowledgement, it will resend the data until it receives an acknowledgement, or until it reaches a time out.
Encryption and caesar cipher
-> Refers to the encoding or scrambling of data so that it is not readable. Text that is not encrypted is known as plain text, while text that has been encrypted is known as cipher text.
One of the earliest encryption methods is the Caesar cipher (I come to bury Caesar, not to praise him).
A Caesar cipher works by taking the message to be encoded and manipulating it by shifting each letter in the message a given number of positions either to the left or to the right.
Symmetric encryption
Symmetric encryption is a type of encryption where the same key is used for encrypting and decrypting the message.
The sending computer must send both the encrypted message and the key, but separately. The receiving computer will then use the key it has received to decrypt the message.
The problem is that if a malicious user intercepts the key, they can read the message.
Asymmetric encryption
In asymmetric encryption, two separate keys are used. One key is used for encryption and the other key is used for decryption. It is much more reliable compared to symmetric encryption: you do not need to share your private key so only you can read the message.
Each device sending or receiving the message has two keys, a private key (used to decrypt messages received and not shared) and a public key (shared with anyone who wants to send them messages).
The person or device sending the message uses the recipient’s public key to encrypt the message. The recipient uses their private key to decrypt the message.