Skip to content

NCEA Level 2 Digital Technologies Error Control (AS91898): Revision

Revision for AS91898, Demonstrate understanding of a computer science concept, using error control as the concept. Original practice at Achieved, Merit and Excellence on parity, 2D parity, barcode check digits and real-world uses, with worked answers.
WorksheetTechnologyYear 12Shared by Heapso

Preview

Answers and teacher notes are hidden here. Verified teachers see them once it's copied into Heapso.

Read the text

Error control: how computers catch their own mistakes

  1. [1]

    Whenever data is stored or sent, some of it can change by accident. A scratch on a disc, electrical interference on a cable or a smudge on a printed barcode can turn a 1 into a 0 or one digit into another. Error control means adding a small amount of extra data so the receiver can tell whether an error has happened (error detection) and, in some methods, work out what the original data was (error correction).

  2. [2]

    Parity bits. With even parity, the sender counts the 1s in a group of bits and adds one more bit, the parity bit, so that the total number of 1s is even. For example, the data 1100101 has four 1s, so its parity bit is 0. The receiver counts the 1s again. If the total is odd, at least one bit has changed. If two bits change, the total is even again and the error is missed.

  3. [3]

    Two-dimensional parity. Data can be arranged in a grid with a parity bit at the end of every row and at the bottom of every column. If one bit flips, exactly one row and one column will have the wrong parity. The bit where that row and column cross is the one that changed, so the receiver can flip it back. This turns detection into correction for single-bit errors.

  4. [4]

    Check digits. Many numbers people type or scan include a check digit worked out from the other digits. A 13-digit barcode (EAN-13, also used for ISBNs) uses weights: the 1st, 3rd, 5th digits and so on are multiplied by 1, and the 2nd, 4th, 6th digits and so on are multiplied by 3. The results are added. The 13th digit is chosen so that the total, including the check digit, is a multiple of 10. A scanner recalculates the total and rejects the code if it is not a multiple of 10, so the operator scans again.

  5. [5]

    Detect and resend, or correct. When data travels over a network, it is split into packets, and each packet carries a checksum calculated from its contents. If the receiver's checksum does not match, it can ask for the packet to be sent again. This works when resending is quick. When resending is impossible or very slow, such as a damaged QR code or a signal from a distant space probe, error-correcting codes are used instead. QR codes include enough extra data to be read even when part of the code is dirty or torn.