Computer Networks – Framing & Error Detection

Error Detection

Parity Check


  • Method: add all the bytes up use ones’ complement arithmetic; then take ones’ complement of the result.
    • Fast but weak protection
  • True code 原码: 符号位 + 绝对值
  • Ones’ complement 反码: 正数同原码,负数:符号位 + 绝对值反码
  • Two’s complement 补码: 正数同原码,负数:反码 + 1

Cyclic Redundancy Check (CRC)

Error Correction

  • Hamming Code
  • Convolutional / Fountain Code
  • Trade off: efficiency or reliability

Multiplexing Methods

  • Fixed Multiplexing – Predictable, expensive
    • Frequency-division multiplexing(FDM)
    • Synchronous Time-Division Multiplexing(STDM)

  • Statistical Multiplexing – Random, cheap
    • Packet Switching


  • Help receiver recognize the start and the end of transmission

Sentinel-Based Approach

  • Use special patterns (sentinel characters) to indicate the start and end of the frame
  • Problem: Similar pattern may exist in payload
    • Solution: character stuffing (在帧体前添加DLE,转义字符)
  • BISYNC帧格式:

Counting Approach

  • Use special patterns to indicate the start of the frame
  • Use number to indicate the length of the frame
  • Problem: Count may contain error
    • Solution: use CRC to detect
  • DDCMP帧格式:

Clock-Based Framing

Leave a Reply

Your email address will not be published.