1.3 & 2.2 Compression & Error Detection Flashcards
State 3 methods for checking for errors in the transmission of data
Parity Check
Checksum
Echo Check
State 1 method for checking for errors in data input
Check Digit
Describe how even parity works?
The sender
- counts the number of ones in the bit pattern
- It adds a 0 if there are an even number of 1’s
- It adds a 1 if there are an odd number of 1’s
The receiver
- counts the number of ones in the bit pattern
- If there are an even number of ones it accepts the message
- If there is an odd number of 1’s it identifies there is an error and requests that the message is resent
Describe how a checksum works
The sender
- Calculates the checksum for the block of bytes
- Transmits the checksum with the block of data
The receiver
- Checksum is recalculated from the block of data
- Compares the calculated checksum to the one transmitted
- If same, data transmitted has been received without errors
- If different a request is sent for date to be retransmitted
Describe how ARQ works
ARQ = Automatic Repeat Request
- It uses an ACKNOWLEDGEMENT and TIMEOUT
- Message is sent by sender and it waits for a set amount of time
- If message received correctly a message (acknowledgement) is sent back by the receiver indicating that data has been received correctly
- If message not received correctly a message (acknowledgement) is not sent back. Timeout occurs and the message is automatically resent.
What is a Check Digit?
- A check digit is calculated from other digits and added to the end of a long code 0 12345 67890 5
- Used to identify errors in data entry caused by mistyping or misscanning a barcode.
How is a check digit used?
- Full code is input (manual or scanned) e.g. 0 12345 67890 5
- Check digit is recalculated from inputted digits
- Compares the calculated check digit to the one entered
- If same, check digit entered without errors
- If different error detected and code is not accepted
Describe 2 types of errors detected by check digits
2 digits transposed e.g. 280419 becomes 280149
Incorrect digit entered e.g 280419 becomes 250419
Describe how an echo check works
- The receiving computer sends a copy of the data immediately back to the sending computer
- The sending computer compares the received data to the sent data
- If they are the same the data is deemed to have arrived without error
What is compression?
- A reduction in the number of bits needed to represent data
- It reduces the size of the file
What are the advantages of compression?
It reduces the size of the file so …
- the transfer speed is quicker
- uses less bandwidth, reducing internet traffic
- takes up less storage space
- allows large multimedia files to be streamed
State 2 different types of compression
Lossy and Lossless
State 2 different types of lossless compression
RLE (Run Length Encoding) and Dictionary
They can be combined
Describe Run Length Encoding compression (lossless)
- It uses a compression algorithm
- No data is lost
- Looks for repeated patterns
- Replaces consecutive identical values into a code consisting of
- the value of the data e.g. A
- a count (number of times it repeats) e.g. 4
- e.g. AAAABBBB = A4B4
Describe Dictionary compression (lossless)
- It uses a compression algorithm
- No data is lost
- Looks for repeated patterns
- Maintains a dictionary (index) of repeating patterns within a file.
- Each pattern is given an ID/value
- The patterns are replaced by their ID /value
Describe lossy compression
- It uses a compression algorithm
- Data is lost and cannot be restored
- Deletes data that is not necessary
- Uses perception shaping (changes that cannot be noticed)
Describe how lossy compression could compress a music file
- It uses a compression algorithm
- Removes sounds the human ear cannot hear
- Uses perception shaping
- If 2 sounds played at the same time it removes the softer sound
- Reduces bit rate/bit depth
- Reduces the sample rate
Describe how lossy compression could compress an image file
- It uses a compression algorithm
- Use perception shaping
- Similar colours are made the same
- uses less colours (colour depth reduced)
- reduce number of pixels (image resolution reduced
Describe how lossy compression could compress a video file
- It uses a compression algorithm
- reduce frame rate
- similar colours are made the same
- uses perception shaping
- uses less colours (colour depth reduced)
- reduce number of pixels (image resolution reduced)
Explain which compression type you would use when emailing a text document to a friend
- Lossless
- RLE or Dictionary (or both) based encoding would be used
- No data is lost
- File can be restored to it’s original state
- Lossy would remove data
- So cannot be read when uncompressed
Explain which compression type you would use to email holiday images to a friend
- Lossy
- would reduce the file size more than lossless
- removes redundant/unnecessary data
- images can still be of a similar quality (perception shaping)
- file does not need to be restored to it’s original state
- Faster to send / upload / download
State 4 image file formats and their type of compression
- .bmp - uncompresssed file format
- .png - lossless compression
- .jpg - lossy compression
- .gif - lossless compression
State 2 audio file formats and their type of compression
- ,mp3 - lossy compression
- .wav - lossless compression
- .flac - lossless compression
Name a commonly used file format for compressing documents
.zip - A ZIP file is an archive that contains one or more files compressed or “zipped”