It yields true if exactly one but not both of two conditions is true. The XOR operation does not have a standard symbol, but is sometimes denoted this work or Simpson , pp. In set theory , is typically called the symmetric difference. The XOR function is implemented as Xor [ predicate1 , predicate2 , The binary XOR operation is identical to nonequivalence. Simpson , where denotes NAND. The binary XOR operator has the following truth table. For multiple arguments, XOR is defined to be true if an odd number of its arguments are true, and false otherwise.
This definition is quite common in computer science, where XOR is usually thought of as addition modulo 2. In this context, it arises in polynomial algebra modulo 2, arithmetic circuits with a full adder, and in parity generating or checking.
While this means that the multiargument "XOR" can no longer be thought of as "the exclusive OR" operation, this form is rarely used in mathematical logic and so does not cause very much confusion. The XOR operation is associative, so is the same as. Computation of the multiargument XOR requires evaluation of all its arguments to determine the truth value, and hence there is no "lazy" special evaluation form as there is for AND and OR.
A bitwise version of XOR can also be defined that performs a bitwise XOR on the binary digits of two numbers and and then converts the resulting binary number back to decimal. Portions of this entry contributed by Roger Germundsson.
Get Word of the Day daily email! Test Your Vocabulary. Can you spell these 10 commonly misspelled words? Need even more definitions? Homophones, Homographs, and Homonyms The same, but different.
Ask the Editors 'Everyday' vs. What Is 'Semantic Bleaching'? How 'literally' can mean "figuratively". Literally How to use a word that literally drives some pe Techopedia Terms. Connect with us. Sign up. Term of the Day. Best of Techopedia weekly. News and Special Offers occasional. Exclusive Or XOR. Exclusive or is also known as exclusive disjunction. Share this Term. Caret Linear Feedback Shift Register.
0コメント