home *** CD-ROM | disk | FTP | other *** search
/ Boldly Go Collection / version40.iso / TS / 05B / TELEDX10.ZIP / PARITY < prev    next >
Encoding:
Text File  |  1992-02-07  |  8.1 KB  |  236 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  9. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  10. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  11.  
  12.                      ┬─┬─────┐
  13.                      │ │     │
  14.                      │ ├─────┘ ┌┬──┐ ┬┬──┐ ┬┬ ┌─┬┬─┐ ┬  ┬┬
  15.                      │ │       │├──┤ │├─┬┘ ││   ││   └──┤│
  16.                      ┴─┴       ┴┴  ┴ ┴┴ ┴─ ┴┴   ┴┴   └──┴┘
  17. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  18. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  19. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  20.  
  21.  
  22. ┌────┐
  23. │PgDn│
  24. └────┘
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. Binary  data is  made up  1's and  0's. PARITY  is a  term used to describe the
  33. number of 1's in a binary number. If the total number of 1's is an EVEN number,
  34. then the PARITY of that binary number is EVEN. If the total number of 1's is an
  35. ODD number  then the PARITY  of that  binary  number is ODD.  That seems pretty
  36. straight forward!
  37.  
  38. A PARITY  Bit  is  used  is  ASYNCH  (NON-synchronous) communications to detect
  39. errors.  The PARITY  bit is  created automatically  by the  Modem and is placed
  40. right  after  the  Stop  bit  (which  is  not  counted  when  PARITY  is  being
  41. determined!).
  42.  
  43.  
  44.  
  45.  
  46. ┌────┐
  47. │PgDn│
  48. └────┘
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. This generated  PARITY bit can be  either a 1 or  a 0 depending on  a couple of
  60. considerations:
  61.  
  62.     1.   The Type of PARITY selected
  63.  
  64.      2.   The actual PARITY of the binary number that is being transmitted.
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ┌────┐
  71. │PgDn│
  72. └────┘
  73.  
  74.  
  75.  
  76.  
  77.                     ┌────────────────────────────────────────┐
  78.                     │ Let's look at a specific binary number │
  79.                     ├────────────────────────────────────────┤
  80.                     │         ┌───┬────────────┬───┐         │
  81.                     │         │   │            │   │         │
  82.                     │         │ 1 │   1111001  │ 0 │         │
  83.                     │         │   │            │   │         │
  84.                     │         └───┴────────────┴───┘         │
  85.                     │           ■  ■          ■  ■           │
  86.                     │           ■  └────┬─────┘  ■           │
  87.                     │         STOP      │      START         │
  88.                     │          BIT      ■       BIT          │
  89.                     │                   7                    │
  90.                     │               DATA BITS                │
  91.                     └────────────────────────────────────────┘
  92.  
  93.  
  94. ┌────┐
  95. │PgDn│
  96. └────┘
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. Now  then, let's  say that  we have  set our  protocol to  7-E-1 which you will
  108. recall means, 7 Data Bits, Even PARITY, and 1 Stop Bit. Count the number of 1's
  109. in the Data Bit. If you came up with 5, go to the head of the class! Since 5 is
  110. an ODD number, the PARITY bit will need to be a 1 to keep the PARITY EVEN.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. ┌────┐
  119. │PgDn│
  120. └────┘
  121.  
  122.  
  123.  
  124.  
  125.                     ┌────────────────────────────────────────┐
  126.                     │ Let's look at a specific binary number │
  127.                     ├────────────────────────────────────────┤
  128.                     │                                        │
  129.                     │       ┌───┬───┬────────────┬───┐       │
  130.                     │       │   │   │            │   │       │
  131.                     │       │ 1 │ 1 │  1111001   │ 0 │       │
  132.                     │       │   │   │            │   │       │
  133.                     │       └───┴───┴────────────┴───┘       │
  134.                     │         ■   ■  ■          ■  ■         │
  135.                     │         ■   │  └────┬─────┘  ■         │
  136.                     │       STOP  │       ■      START       │
  137.                     │        BIT  │       7       BIT        │
  138.                     │             ■   DATA BITS              │
  139.                     │         PARITY BIT                     │
  140.                     └────────────────────────────────────────┘
  141.  
  142. ┌────┐
  143. │PgDn│
  144. └────┘
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. The Data Bit was ODD, so a 1 PARITY bit is added to make the number EVEN (5 + 1
  153. = 6). Incidentally, the original Data Bit  could be sent without the PARITY bit
  154. if we were set for 7-N-1 (7 Data bits, NO PARITY, and 1 Stop Bit).
  155.  
  156. PARITY and ERROR DETECTION
  157.  
  158. We have  already discussed the  fact that binary  data is made  up 1's and 0's.
  159. PARITY is a term that is used to describe the number of 1's in a binary number.
  160. If the total  number of 1's is an  EVEN number, then the Parity  of that binary
  161. number is EVEN. If the total number of  1's is an ODD number then the Parity of
  162. that binary number is ODD. That seems pretty straight forward!
  163.  
  164.  
  165.  
  166. ┌────┐
  167. │PgDn│
  168. └────┘
  169. Remember, a Parity  Bit is used is ASYNCH communications  to detect errors. The
  170. Parity bit is created automatically by the  Modem and is placed right after the
  171. Stop  bit  (which  is  not  counted  when  Parity  is  being determined!). This
  172. generated  Parity bit  can be  either a  1  or  a 0  depending on  a couple  of
  173. considerations: the Type of Parity selected and the actual Parity of the binary
  174. number that is being transmitted. Let's look at a specific binary number:
  175.  
  176.                      ┌────────────────────────────────────────┐
  177.                      │         ┌───┬────────────┬───┐         │
  178.                      │         │   │            │   │         │
  179.                      │         │ 1 │   1111001  │ 0 │         │
  180.                      │         │   │            │   │         │
  181.                      │         └───┴────────────┴───┘         │
  182.                      │           ▀  ▀▀───┬────▀▀  ▀           │
  183.                      │           ▀       │        ▀           │
  184.                      │         STOP      │      START         │
  185.                      │          BIT      │       BIT          │
  186.                      │                   7                    │
  187.                      │               DATA BITS                │
  188.                      └────────────────────────────────────────┘
  189.  
  190. ┌────┐
  191. │PgDn│
  192. └────┘
  193.  
  194.  
  195. Now  then, let's  say that  we have  set our  protocol to  7-E-1 which you will
  196. recall means, 7 Data Bits, Even Parity, and 1 Stop Bit. Count the number of 1's
  197. in the Data Bit. If you came up with 5, go to the head of the class! Since 5 is
  198. an ODD number, the Parity bit will need to be a 1 to keep the Parity EVEN.
  199.  
  200.                   ┌────────────────────────────────────────────┐
  201.                   │         ┌───┬───┬────────────┬───┐         │
  202.                   │         │   │   │            │   │         │
  203.                   │         │ 1 │ 1 │  1111001   │ 0 │         │
  204.                   │         │   │   │            │   │         │
  205.                   │         └───┴───┴────────────┴───┘         │
  206.                   │           ▀   ▀  ▀▀───┬────▀▀  ▀           │
  207.                   │           ▀   ▀       │        ▀           │
  208.                   │         STOP  │       7      START         │
  209.                   │          BIT  │   DATA BITS   BIT          │
  210.                   │               │                            │
  211.                   │           PARITY BIT                       │
  212.                   └────────────────────────────────────────────┘
  213.  
  214. ┌────┐
  215. │PgDn│
  216. └────┘
  217.  
  218.  
  219.  
  220.  
  221.  
  222. The Data Bit was ODD, so a 1 Parity bit is added to make the number EVEN (5 + 1
  223. = 6). Incidentally, the original Data Bit  could be sent without the PARITY bit
  224. if we were set for 7-N-1 (7 Data bits, NO Parity, and 1 Stop Bit).
  225.  
  226. So how does  this all come together? Both ends  of the COMMunications link must
  227. use the  same Parity (translate  that to SAME  PROTOCOL). If you  are calling a
  228. Bulletin Board and DOWNloading a file, your  computer checks each Byte as it is
  229. received.  If a  Byte is  received which   has the  wrong Parity,  an Error  is
  230. detected and  your Computer sends a  message back to the  BBS demanding that it
  231. re-send that messed up Byte.
  232.  
  233. You've probably  seen your D/L Pause  briefly while error correction  is taking
  234. place.  Using today's  sophisticated File  transfer protocols,  if an  error is
  235. generated it is usually due to line noise.
  236.