Check the bits, guard the data
Answers are for parents and teachers.
1
The sender uses even parity. Write the parity bit and the byte sent for the data bits 0101011, 1111000 and 0000010.
0101011 has 4 ones, so the bit is 0 and the byte is 00101011. 1111000 has 4 ones, so the bit is 0 and the byte is 01111000. 0000010 has 1 one, so the bit is 1 and the byte is 10000010.
2
Both devices use odd parity. Say whether each received byte passes: 10101011, 01110111 and 00110000.
10101011 has 5 ones, so it passes. 01110111 has 6 ones, so it fails. 00110000 has 2 ones, so it fails.
3
This block was sent with even parity and has one wrong bit. Find the row check and the column check results and name the wrong bit.
| Parity bit | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Row check | |
|---|---|---|---|---|---|---|---|---|---|
| Byte 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | ? |
| Byte 2 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | ? |
| Byte 3 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | ? |
| Byte 4 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | ? |
| Parity byte | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | ? |
| Column check | ? | ? | ? | ? | ? | ? | ? | ? |
Byte 4 fails its row check and the Bit 1 column fails its column check, so the wrong bit is in Byte 4, Bit 1. It reads 0 and should read 1.
4
Explain why the sender and receiver must agree on even or odd parity before they send the data.
The receiver tests the byte against a rule. If the sender used even parity and the receiver tested for odd, every good byte would look wrong (and every wrong byte might look good). So both must use the same rule, which they can agree during a handshake.
5
Invent a small place, such as a swimming club. List two kinds of its data, decide which needs stronger protection and give a reason. Then choose one measure that costs little and say what it protects against.
Model answer: The club keeps its timetable (public, little protection) and its members’ addresses (private, strong protection, because a leak would harm the members). A cheap measure is a locked cupboard for the office computer, which protects against people reaching the machine.