|
Exclusive disjunction or exclusive or is a logical operation that outputs true only when both inputs differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR (), EOR, EXOR, ⊻, ⊕, ↮, and ≢. The opposite of XOR is logical biconditional, which outputs true only when both inputs are the same. It gains the name "exclusive or" because the meaning of "or" is ambiguous when both operands are true; the exclusive or operator ''excludes'' that case. This is sometimes thought of as "one or the other but not both". This could be written as "A or B but not A and B". More generally, XOR is true only when an odd number of inputs is true. A chain of XORs—''a'' XOR ''b'' XOR ''c'' XOR ''d'' (and so on)—is true whenever an odd number of the inputs are true and is false whenever an even number of inputs are true. ==Truth table== The truth table of A XOR B shows that it outputs true whenever the inputs differ: 0 = FALSE 1 = TRUE 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Exclusive or」の詳細全文を読む スポンサード リンク
|