Thread: Parity check ideas

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    58

    Parity check ideas

    Hi;

    I have a project where i am doing some parity checking.

    Basically i have an array that contains values that cant be parity, ie 3,5,9 etc.

    A buffer filled with a message of bytes .

    So i have a loop to go through buffer.
    First byte is check to see if its of an odd parity, if it is odd we set an odd flag, ie not a member of the array above, if it is a member of the array, we check to see if its even parity and if so we set a flag.

    go thru each byte till finish with buffer

    Basically i am wondering is there a more efficient way of doing this type of parity??

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Provide a better example of what you are trying to do along with sample code if you have written any.
    Is the array of type char or int? Which buffer element you want to check for parity and why do you want to go thro' ea. element of the buffer?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-05-2010, 11:42 PM
  2. Hamming code / even parity help
    By Striker9 in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2009, 09:14 PM
  3. Company Name Ideas
    By brunomiranda in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 12-16-2003, 05:15 PM
  4. A way to check for Win98 or WinXP
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 10-31-2002, 11:06 AM
  5. how to check for end of line in a text file
    By anooj123 in forum C++ Programming
    Replies: 6
    Last Post: 10-24-2002, 11:21 PM