Exclusive OR howto?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Ali_en's Avatar
    Ali_en Guest

    Default Exclusive OR howto?

    Hi all

    I need to perform an exclusive OR i.e. "XOR" operation, the logical "XOR" operator just gives 0 or 255 as output and i am still not able to find anyway of getting the exact value of the "XOR" operation on two bytes i.e. having two bytes "A" and "B" and finding the value of "C" as C= A XOR B... i would be gratified by any help in this regard

    Cheers
    MAK

  2. #2
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    Try C = A ^ B

  3. #3
    Ali_en's Avatar
    Ali_en Guest


    Did you find this post helpful? Yes | No

    Default Thanks Ingvar

    Dear Ingvar!

    Thanks for replying, as i finished posting the question, i found the same C=A^B solution on the following url, that mentions the details about the PIC Basic bitwise operations:

    http://picbasic.com/resources/articles/boolean.htm

    actually the documentation i have, has nothing like XOR mentioned in the Bitwise Operators section and that pi**ed me off... bytheway thanks alot for your help...

    Cheers
    MAK

Similar Threads

  1. HSEROUT full 3 digit display of variable howto ?
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th October 2008, 13:53
  2. Offset to variable howto ?
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 3rd October 2008, 09:36
  3. Exclusive bit settings (i.e. PORTS)
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2007, 21:37
  4. Exclusive OR - XOR
    By Archangel in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th September 2006, 09:44
  5. HOWTO Convert character to Decimal
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th April 2005, 17:00

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts