newbie sending hex values over UDP socket

Bill Seitz fluxent at yahoo.com
Tue Sep 14 14:57:21 EDT 2004


fluxent at yahoo.com (Bill Seitz) wrote in message news:<e2491a75.0409110433.2e9c00c5 at posting.google.com>...
> Excellent - now how about calculating a parity-check byte?

Here's the definition of the parity byte:

The column parity is one (1) byte.  The eight bits of data in this
byte re¬flect the odd parity of all corresponding bits in the block;
i.e. bit 8 of the Column Parity byte is the odd parity of all bit 8's
in the entire block.
Column parity will be calculated by the sender as follows:

(a)	Begin with the value 255.

(b)	Exclusive OR the current value with the value of the first (or
next) data byte beginning with the header byte.  Repeat until all
bytes up to, but not includ¬ing, the parity byte have been used.

(c)	Send the result in the column parity position.



More information about the Python-list mailing list