Lectures Obsolescence
Scrambler

  Scrambling provides a result similar to RLL by limiting long runs of 
    zeros or ones but uses a different technique.

    Repeated words produce different scrambled words.

    Permutation - arrange playing cards by suite or by face value. 
      Same cards, different order.

  Uses pseudo-random number generator with known seed values to encrypt
    the data stream.

  Used for encrypting data but also used as a way to improve error recovery
    in streaming data.

  Additive
    Includes periodic sync value at regular intervals in data stream 
      for decrypting algorithm to reinitialize decoding sequence. 

  Multiplicative.
    Self-syncing.

  Scrambling and descrambling performed at hardware level with shift registers,
    very quick and efficient.

  Used on optical discs (CD, DVDs, BluRay), HyperTransport bus, SATA, etc.

  Does NOT protect against errors itself, 
    but helps to make various error correcting techniques more successful.

  Can minimize DC characteristics of signal.

Parity bits
  Used with very small work units - 7 or 8 bits most common.
    11-12.5% overhead.

  Uses extra bit as flag bit.

  Parity bit set to reflect specific parity.
    Even  or  Odd

  Detects single bit error.
    Unless you know which bit failed, only detects that it did.

    Works well in RAID disk arrays to recover lost drives.

  Not practical on long string of bits because multiple errors could cancel
    each other out.

  Primary memory in early standard PCs.
    DDR4 has built-in parity check support.

  Original Modems

CRC - cyclic redundancy check

  Used with long sequences of bits. Most often used with data transmittion.

  Calculates a "check sum" on a block of data based on polynomial-division.
    Remainder appended to data block. 

  Receiver does the same math with incoming data and CRC checksum, 
      If result 0, data transfer good.
      If not zero, then corrupt data identified. 

  Fairly low overhead.

  Cannot identify error location, just flags failed transmission.

  Easy to implement at the hardware level.

  Very useful in detecting burst errors (errors close together in a particular 
    sequence of bits).

  Parity bit is an example of a very small CRC check.

  USB, ISDN (early high speed modems), mobile networks, SCSI. 


Hamming code
  Allows for detection and repair of single bit error.
   And can detect double errors.

  More efficient when applied to larger collection of data bits.

  Data      Check     Total
  4 bits,   3 bits,   7 bits.  57%
 
    

  11  bits, 4 bits,  15 bits.  73%
  
  26  bits, 5 bits,  31 bits.  84%
 
  57  bits, 6 bits,  63 bits.  94.5%

  120 bits, 7 bits, 127 bits.  97%

  Usually performed at hardware level for speed requirements
    Proposed but not implemented for RAID.  Too slow for streaming data.
   
  However, it is found on primary memory on servers, usually when memory
    is viewed as 32 or 64 bits words.  8 byte word and 1 byte hamming code.

  ECC memory.

    Used in primary memory on Sun's servers.

Reed-Solomon  (sort of cross between Hamming and CRC)
  Calculations work with blocks of bytes.

  RS(255,223) - 223 data bytes, 32 syndrome (correction) bytes.
    Can catch and correct up to 16 bytes. ~ 14% overhead

  High performance disk drives, CDs, DVDs, Blue-ray, etc. 
    
    QR Code 

  Used where cost of re-transmission too high or time sensitive, such as deep 
    space probes (early), DSL, WiMAX, ATSC/DVB (broadcast digital TV).
 
  Being replaced in Hard drives with LDPC

Turbo-code  (Early 90's)
  Error Correcting.

  Used in 3G/4G mobile, deep space probes, WiMAX, etc.

  Uses two different error checks and cross checking between them to pick 
    the best guess if error suspected.  

  Analogy - like solving cross word, using both the row and column clues 
    in crossword to find right fit on row.

  Used where reliability more important than maximum bandwidth use and
    latency constraints costly. (Space probe - hours away).
 
  Transmitting/storing
    Block of code is allocated.
    A series of parity bits is calculated for block.
    Block is permutated (arranged differently)
    Second series of parity bits is calculated for block.
    Block and both sets of parity bits combined.

  Receiving/reading essentially reverses this.
    Errors can be cross-checked to arrive at a 'best' guess. 

  Can be implemented with hardware logic for very fast processing.

Low-density parity check code  LDPC
  Conceptualized 1963 but not practical at the time.

  Error correcting.

  Calculates a set of parity bits for groups of bits to create a code word.
  Code words are unique enough that even if SOME corruption occurs, only one
  correct code word would be a close enough match.
  
  * Was not practical in early days of computing.

  Both encoding and decoding is now done ahead of time and stored in look-up
    tables.

  Live encoding/decoding implemented with low-power CPUs accessing the look-up
    tables.

  Replacing Reed-Solomon and Turbo-code on hard drives.

  Very fast decoding of data stream especially at high speed. (1Gbit/s and up)

  10G-baseT Ethernet, Wi-Fi 802.11, digital TV satellite transmission.