AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Term 3 in review

Week 30 · Review: Term 3 · 3 lessons
1

Send, check, protect

Computing 9: Topics 3.2–4.6, pp. 273–358
GoalReview how data is sent in packets, how long a transfer takes, how parity checks work and what they miss, and how networks are protected.
New words
packet · a small piece of a message that carries an address, so that it can be sent separately and rebuilt at the endbandwidth · the amount of data a connection can carry each second, such as 40 Mbit/sparity bit · an extra bit added to a byte so that the number of 1s is always even (even parity) or always odd (odd parity)phishing · a message that pretends to be from a trusted sender to trick you into giving away private information
Explanation

Data travels across a network in packets, and devices follow protocols, which are agreed rules. A handshake starts a connection, and HTTP or HTTPS carries requests from a client to a server. The time to send a file is its size in megabits (megabytes × 8) divided by the bandwidth in megabits per second. A parity bit is added so that the count of 1s in a byte is always even or always odd, and in this course it is written first. A parity check detects one wrong bit but not two wrong bits, and it cannot say which bit is wrong. Networks are protected by physical measures, such as locked rooms, and digital measures, such as passwords, firewalls and backups. Trained staff can also spot phishing.

IdeaRule to remember
time to sendmegabytes × 8 ÷ megabits per second
number of packetssize ÷ packet size, rounded up
parity checkcount all 8 bits; the count must match the agreed rule
parity limittwo changed bits can pass the check
Worked examples
Packet1234
Size in MB4443
Time and packets. A 15 MB file is sent over a 40 Mbit/s connection. It is 15 × 8 = 120 megabits, and 120 ÷ 40 = 3 seconds. If it is cut into packets of at most 4 MB, three packets are full and the last one carries the rest, so there are four packets.
Byte1s countedOdd?Result
111001015yespass
111001116nofail
Odd parity. The data bits 1100101 have four 1s. To make the total odd, the parity bit is 1, so the byte sent is 11100101, with five 1s. At the receiver, 11100101 passes. But 11100111 has six 1s, which is even, so it fails: at least one bit changed.
Byte1sParity check
sent111001015pass
received111001105pass, but wrong
A check that is fooled. The byte 11100101 is sent, but interference changes its last two bits and 11100110 arrives. It has five 1s, which is odd, so the byte passes the odd parity check although it is wrong. Two changed bits can cancel each other out, which is why a parity block, or another check, is sometimes added.
Class activity

Packets and parity (no computer). Part 1: write a message of 12 words and cut a card into 6 pieces. Write 2 words and a number on each piece, shuffle them, and ask a partner to rebuild the message. Then remove one piece, as if a packet were lost. What must the receiver ask for? Part 2: use 8 coins, heads for 1 and tails for 0. Set 8 coins with an odd number of heads. Hide them, flip one coin secretly and ask a partner to count: do they notice? Can they say which coin changed? Flip two coins and count again. What happens?

Practice
1
A 20 MB file is sent over a 32 Mbit/s connection. How long does it take on its own? Then it is cut into packets of at most 6 MB: how many packets are there, and how big is each?
2
The sender uses even parity. Write the parity bit and the byte sent for each row of data bits.
Data bits1sParity bitByte sent
1010011???
0001110???
1111111???
0000000???
3
Both devices use odd parity. Count the 1s in each received byte and say pass or fail.
Byte received1sResult
01101101??
11011011??
00010000??
4
A school adds a second building 300 metres away. Why can it not just use one longer cable, and what could it use instead?