- DLL services → framing (byte / bit stuffing) → error types → detection: parity, 2D parity, CRC, checksum → correction.
- Tutorial 4 = calculations on parity, CRC and checksum. Practise each by hand.
- This part is 3.1 introduction and 3.2 data link control (framing, error control). Part 2 is 3.3 media access control.
- Framing: wrap the packet in a frame with a header AND trailer; the receiver deframes.
- Addressing: layer-2 (physical, MAC) addresses in the frame header.
- Framing = packing bits into frames so the receiver knows where each one starts and ends (like envelopes).
- The destination address says where it goes; the sender address lets the receiver acknowledge it.
- Error control: detect (and sometimes correct) errors.
- Flow control: don’t send faster than the receiver can process; wait for acknowledgments.
- Access control: who may use a shared medium. That is the MAC sublayer (Part 2).
Seen again
🎯 How this can come up · 2 questions
Making sure the sender does not send faster than the receiver can process is:
Correct: Flow control.
Controlling access to a shared medium is done by the:
Correct: MAC sublayer.
- Character (byte) oriented: frame length is a whole number of bytes. Bit oriented: any number of bits.
🎯 How this can come up · 1 question
A framing protocol whose frame length need not be a multiple of 8 bits is:
Correct: Bit oriented.
- A flag byte marks the start and end of every frame.
- Problem: the flag pattern can appear inside the data.
- Byte stuffing: the sender puts an ESC byte before any flag OR ESC byte in the data. The receiver removes each ESC and treats the next byte as data.
🎯 How this can come up · 2 questions
In byte stuffing, the sender adds an extra ESC byte:
Correct: Before every flag or ESC byte in the data.
Byte stuffing is done at the receiver.
False. Stuffing is done by the sender; the receiver unstuffs.
- Bit-oriented frames also use the flag 01111110 at both ends.
- After five 1s in a row, the sender always inserts a 0, even if the next bit is already 0. So 01111110 can never appear in the data.
- Receiver: five 1s then 0 → drop the 0. Five 1s then 1 → it’s a flag.
🎯 How this can come up · 3 questions
After bit stuffing, the data 0111111 becomes:
Five 1s → add a 0, then the sixth 1 follows.
Bit stuffing inserts a 0 after how many consecutive 1s?
Correct: 5.
Stuff the bits 0001111111001111101000 for transmission with flag 01111110.
000111110110011111001000: a 0 goes in after the first five 1s of the 1111111 run and after the five 1s of 11111.
- Errors can’t be avoided, so some applications need them detected and corrected.
- Two kinds: single-bit and burst.
- Single-bit: exactly ONE bit of the data unit changed.
- Burst: TWO or more bits changed (not necessarily next to each other).
- Burst length = from the first corrupted bit to the last, counting the good bits in between.
- The faster the link, the more bits a burst of noise hits.
🎯 How this can come up · 2 questions
In a burst error, the corrupted bits must be consecutive.
False.
Bits 3 and 9 of a frame are corrupted and nothing in between. The burst length is:
9 - 3 + 1 = 7.
- Same 2 ms of noise: 2 bits on a slow link, 2 million on a fast one. That is why burst errors are worse at high rates.
🎯 How this can come up · 1 question
A 5 ms burst of noise hits a 100 Mbps link. How many bits are affected?
10⁸ × 5 × 10⁻³.
- Every detection method sends EXTRA (redundant) bits along with the data.
- Parity check · CRC · checksum.
🎯 How this can come up · 1 question
Which is NOT an error-detection method?
Correct: Bit stuffing.
- Sender: a generator adds redundant bits. Receiver: a checker recomputes them and accepts or discards.
- Receiver computes the syndrome: 0 = accept, 1 = discard.
- Even parity: make the total number of 1s even. Odd parity: make it odd.
- C(5, 4): 4-bit dataword → 5-bit codeword (one parity bit).
🎯 How this can come up · 1 question
With even parity, the dataword 1011 becomes:
Three 1s → parity 1.
- Each 7-bit ASCII character gets one even-parity bit: count the 1s and add 0 or 1 to make the count even.
Asked in a course tutorial
🎯 How this can come up · 2 questions
With even parity, the 7-bit dataword 1111000 becomes:
Tutorial 4, Q2: four 1s, so parity 0.
With even parity, 1010101 is sent as:
Tutorial 4, Q2: four 1s, parity 0.
- Every character has an even number of 1s → accepted.
- Counts 7 and 5 are odd → corrupted: discard and ask for retransmission.
Asked in a course tutorial
🎯 How this can come up · 1 question
With even parity, the receiver gets 10101010, 11110001 and 00000001. Which are valid, and can it correct the bad ones?
10101010 has four 1s → valid. 11110001 has five 1s → invalid. 00000001 has one 1 → invalid. Simple parity only detects; it can’t tell which bit flipped, so the receiver discards and asks for retransmission.
- Detects ALL single-bit errors. Detects a burst only if an ODD number of bits changed.
🎯 How this can come up · 2 questions
Simple parity check can detect all burst errors.
False. Only when an odd number of bits changed.
Simple even parity will NOT detect an error when:
Correct: Two bits are flipped.
- 2D parity: arrange the data in rows; add a parity bit to each row AND a parity row for the columns.
- Row parities catch which row; column parities catch which column. One bad bit = the crossing point, so it can be corrected.
Asked in a course tutorial
🎯 How this can come up · 1 question
Compute the 2D even parity for the datawords 1010, 0111, 1100, 1001.
Row parities: 1010→0, 0111→1, 1100→0, 1001→0. Column parities: 1, 0, 0, 0, and the parity of the parity column is 1. Block sent: 1010|0, 0111|1, 1100|0, 1001|0, 1000|1.
- 2D parity corrects 1 error and detects 2 or 3.
- It misses 4 errors that sit at the corners of a rectangle: every row and column still has even parity.
🎯 How this can come up · 2 questions
Two-dimensional parity can correct a single-bit error.
True. The bad row and bad column cross at the bit.
Which error pattern can two-dimensional parity miss?
Correct: Four errors at the corners of a rectangle.
- Sender: append n zeros (n = divisor length - 1), divide, the remainder is the CRC. Send data + CRC.
- Receiver: divide data + CRC by the same divisor. Remainder 0 → accept; otherwise reject.
- The divisor is called the generator (polynomial), because it generates the CRC bits.
- Each 1 bit is a power of x: 1000011 = x⁶ + x + 1.
- Division uses XOR, with no carries.
🎯 How this can come up · 2 questions
The generator x³ + x + 1 in binary is:
Correct: 1011.
1000011 as a polynomial is:
Correct: x⁶ + x + 1.
- Dataword 1001 + 000 ÷ 1011 → remainder 110 → codeword 1001110.
- When the leftmost bit of the current remainder is 0, divide by 0000 instead (just bring the next bit down).
Asked in a course tutorial
🎯 How this can come up · 3 questions
With generator 1011, the CRC for dataword 11010011 is:
Tutorial 4, Q5: transmitted codeword 11010011011.
With generator x³ + x + 1, the frame sent for data 101110 is:
Tutorial 4, Q7: the remainder is 110.
With generator 1011, the CRC for dataword 1101 is:
Tutorial 4, Q10b: frame 1101001.
- Remainder (syndrome) 000 → accept. Anything else → discard.
Asked in a course tutorial
🎯 How this can come up · 2 questions
Generator 1011. The receiver gets 11010011101. What happens?
Tutorial 4, Q5b.
Generator x³ + x + 1: the received frame 101110101 is accepted.
False. Tutorial 4, Q7b: the remainder is 011, so it is rejected.
- A zero remainder means no error detected.
- Append (divisor length - 1) zeros, not divisor length.
- CRC-32 is the one used in LANs (Ethernet’s FCS).
- CRC catches single, double, odd-count and burst errors, and is fast in hardware.
- A generator of degree r catches ALL bursts of length ≤ r.
- Length r + 1 slips by with probability 1/2^(r-1); longer ones with 1/2r.
🎯 How this can come up · 1 question
The generator x¹⁸ + x⁷ + x + 1 detects all burst errors of length up to:
Correct: 18.
- Higher degree → longer bursts caught → that’s why LANs use CRC-32.
- Checksum: add all words (one’s complement), complement the sum, send it. The receiver adds everything; complemented result 0 = OK.
- Steps: split into 16-bit words, checksum field = 0, add with one’s complement, complement → checksum.
- Receiver: add all words INCLUDING the checksum, complement. 0 → accept, anything else → reject.
- Complement = flip every bit.
Asked in a course tutorial
🎯 How this can come up · 2 questions
The 8-bit checksum of 10101010, 01010101, 11110000 and 00001111 is:
Tutorial 4, Q9: the sum is 11111111, so the complement is 00000000.
Sender words 1100110011001100 and 1010101010101010. The 16-bit checksum is:
Tutorial 4, Q3: the sum with the carry wrapped is 0111011101110111; its complement is the checksum.
- No error → sum all 1s → complement all 0s.
Asked in a course tutorial
🎯 How this can come up · 1 question
In Tutorial 4 Q3, the receiver gets checksum 0110010101100101 for the two words. The packet is error-free.
False. The correct checksum is 1000100010001000; with the received one the complemented sum is not 0, so an error is detected.
- Nonzero after complementing → corrupted.
- Two ways to fix errors: send it again, or send enough redundancy to fix it on arrival (FEC).
- Retransmission is bad for wireless (high bit error rate → too many resends) and for real-time multimedia (waiting = delay).
🎯 How this can come up · 1 question
Retransmission is a poor fit for real-time multimedia because:
Correct: Waiting for a resend causes unacceptable delay.
- FEC fixes errors at the receiver with no resend.
- XOR trick: send R = XOR of all blocks; any ONE lost block = XOR of R with the rest.
- Three FEC methods: 2D parity, XOR, chunk interleaving.
🎯 How this can come up · 2 questions
Blocks C1..C4 and R = C1 ⊕ C2 ⊕ C3 ⊕ C4 are sent, and C3 is lost. C3 equals:
Correct: R ⊕ C1 ⊕ C2 ⊕ C4.
Forward error correction needs the sender to retransmit corrupted data.
False.
- Interleave: spread each packet’s chunks across several transmitted packets. Losing one packet then costs each original packet only one chunk, which multimedia can tolerate.
- The lost packet (orange) removes one chunk from each of the five packets instead of a whole packet.
🎯 How this can come up · 1 question
A video stream loses one whole packet in a burst. How does chunk interleaving keep the video watchable?
Each original packet’s chunks were spread over several transmitted packets (sent column by column). Losing one transmitted packet removes just one small chunk from each original packet, a gap small enough for multimedia to hide, instead of losing an entire packet.
No slides match this filter.




















