home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / hamming / hamming.lbr / HAMMING.DQC / HAMMING.DOC
Text File  |  1985-06-17  |  3KB  |  99 lines

  1.  
  2.  
  3. notes and comment for decxham.asm and formham.asm
  4.  
  5. hamming code encoding example...
  6.  
  7.     . generation of check bit value
  8.  
  9.                      transmitted bits
  10. check bit  m    x1    x2    a    x4    b    c    d
  11. ---------  -    --    --    -    --    -    -    -
  12.  
  13.     x1                      *          *         *
  14.     x2                      *               *    *
  15.     x4                                 *    *    *
  16.     m      *    *     *     *    *     *    *    *
  17.  
  18.  
  19.     find the check bit values for the following 
  20.     information bits. use odd parity.
  21.  
  22.  
  23.                                          a    b    c    d
  24.                                          -    -    -    -
  25.                                          1    0    1    1
  26.  
  27.  
  28.      x1 = a, b, d      therefore x1 = 1
  29.      x2 = a, c, d      therefore x2 = 0
  30.      x4 = b, c, d      therefore x4 = 1
  31.      m = x1, x2, x4, a, b, c, d     therefore m = 0
  32.  
  33.      the coded bits are:
  34.  
  35.      m    x1    x2    a    x4    b    c    d
  36.      -    --    --    -    --    -    -    -
  37.      0    1     0     1    1     0    1    1
  38.  
  39. hamming decoding example...
  40.  
  41.            .checking for errors at the receiver
  42.  
  43.  
  44.                              transmitted bits
  45. parity checks    m    x1    x2    a    x4    b    c    d
  46. -------------    -    --    --    -    --    -    -    -
  47.     ck1               *           *          *         *
  48.     ck2                     *     *               *    *
  49.     ck4                                *     *    *    *
  50.     mck          *    *     *     *    *     *    *    *
  51.  
  52.  
  53.  
  54.      parity check results
  55. mck    ck1    ck2    ck4                bit in error
  56. ---    ---    ---    ---                -----------
  57. f      f      f      f                       d
  58. f      f      f      p                       a
  59. f      f      p      f                       b
  60. f      f      p      p                       x1
  61. f      p      f      f                       c
  62. f      p      f      p                       x2
  63. f      p      p      f                       x4
  64. f      p      p      p                       m
  65. p      f      f      f                 double error
  66. p      f      f      p                   "      "
  67. p      f      p      f                   "      "
  68. p      f      p      p                   "      "
  69. p      p      f      f                   "      "
  70. p      p      f      p                   "      "
  71. p      p      p      f                   "      "
  72. p      p      p      p                    no error
  73.  
  74.  
  75. p-parity check passes        f-parity check fails
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. caution
  83.  
  84.  this project just sort of happened without any real objective
  85. or goal. the routines seem to work well when beat around with
  86. ddt, but i really don't know what would happen if they were
  87. linked to your favorite modem program. that is for you to find
  88. out!. my experiment is over for the meantime. maybe i will put
  89. together a doc file on error correction techniques, better still
  90. , maybe this project will stimulate someone active in data comm.
  91. to bring us all up to date.
  92.  
  93.  
  94.  
  95.  
  96.                                       rod hart
  97.                                       wa3mez
  98.  
  99.