UNIHIVE

Study Hub UNIPORT CSC 284

CSC 284 · Introduction to Logic Design

Error detection, parallel and serial transmission

Parity bits, Hamming distance, checksums, and how bits travel between parts of a system.

Our notes

2 min read

Errors happen

Noise on a cable, radio interference or a faulty memory cell can flip a bit. Systems add extra (redundant) bits so errors can be detected or even corrected.

Parity

One extra bit makes the number of 1s even (even parity) or odd (odd parity).

  • Data 1011 001 has four 1s. Even parity bit = 0; odd parity bit = 1.
  • The receiver counts 1s. A wrong count means an error.
  • Parity finds any single error (and any odd number of errors) but misses two errors in the same word.

Worked example

With even parity, which of these 8-bit words has an error? 1100 1100 (four 1s: fine), 1011 0111 (six: fine), 1110 0011 (five: error).

Block (two-dimensional) parity

Send several words with a parity bit per row and a parity word for the columns. A single error shows in one row and one column, so its position is known and it can be corrected.

Hamming distance and codes

The Hamming distance between two code words is the number of bits that differ (1011 and 1110 differ in 2 places). To detect d errors a code needs minimum distance d + 1; to correct c errors it needs 2c + 1. The Hamming (7,4) code adds 3 check bits to 4 data bits and corrects any single error; it is used in ECC memory.

Checksums and CRC

A checksum adds the data bytes and sends the total. A cyclic redundancy check divides the data by a fixed binary polynomial and sends the remainder; it catches burst errors and is used in Ethernet, Wi-Fi and ZIP files.

Parallel transmission

All bits of a word travel at once on separate wires (an 8-bit bus has 8 data lines). Fast over short distances (inside a chip or on a circuit board), but wires are costly and timing skew limits long cables.

Serial transmission

Bits travel one after another on one line. Cheaper over distance and, with modern high clock rates, faster than old parallel links: USB, SATA, PCI Express and Ethernet are all serial.

  • Asynchronous: each character is framed with a start bit and stop bit (UART).
  • Synchronous: sender and receiver share a clock or recover it from the data.

Memory in outline

Memory stores bit patterns at numbered addresses. With k address lines there are 2ᵏ locations: 16 lines address 65,536 bytes (64 KB).

Exams usually ask

  • Add even or odd parity bits; find the faulty word.
  • Compare serial and parallel transmission with examples.

Common mistake

Claiming parity can correct errors: a single parity bit only detects them.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 284 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.