Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Exclusive disjunction


 

In logic, the treatment of the word or requires a little care (for a native English speaker; some other languages have greater precision). Exclusive disjunction is the sense of the word or as in the proverb you can have your cake or eat it (but not both). The exclusive disjunction of propositions A and B means A or B, but not both. In logic, unqualified disjunction is normally understood to mean the inclusive sense.

More formally exclusive disjunction is a logical operator. The operation yields the result TRUE when one, and only one, of its operands is TRUE. The exclusive disjunction of propositions A and B is usually called A xor B, where "xor" stands for "exclusive or" and is pronounced "eks-or" or "zor".

For two inputs A and B, the truth table of the function is as follows.


A B A xor B
F F F
F T T
T F T
T T F


It can be deduced from this table that

(A xor B) (A and not B) or (not A and B) ⇔ (A or B) and (not A or not B) ⇔ (A or B) and not (A and B)

For more than two inputs, xor can be applied to the first two inputs, and then the result can be xor'ed with each subsequent input:

(A xor B xor C xor D) ⇔ (((A xor B) xor C) xor D)

Because xor is associative, the order of the inputs does not matter: the same result will be obtained regardless of order.

In general, the result of xor depends on the number of TRUE operands, if there are an odd number of TRUE operands, then the result will be TRUE, otherwise it will be FALSE.

The mathematical symbol for exclusive disjunction varies in the literature. In addition to the abbreviation "xor", one may see

Similarly, different textual notations are used, including "EOR" (with the same expansion as "xor") and "orr" (modelled on iffIn mathematics, philosophy, logic and technical fields that depend on them, iff is used as an abbreviation for if and only if . It is often, not always, written italicized: iff''. Although "P iff Q" is most standard, common alternative phrases include "P, of which it is the negative).

Binary values xor'ed by themselves are always zero. In some computer architectures, it is faster, or takes less space, to store a zero in a register by xor'ing the value with itself instead of loading and storing the value zero. Thus, on some computer architectures, xor'ing values with themselves is a common optimizationIn computing, optimization is the process of modifying a system to improve its efficiency. The system can be a single computer program, a collection of computers or even an entire network such as the Internet. Although the word "optimization" shares the s.

The xor operation is sometimes used as a simple mixing function in cryptographyCryptography (from Greek kryptos "hidden", and graphein "to write") is, traditionally, the study of means of converting information from its normal, comprehensible form into an incomprehensible format, rendering it unreadable without secret knowledge — th, for example, with one-time padIn cryptography, the one-time pad (OTP is a theoretically unbreakable method of encryption where the plaintext is combined with a random pad the same length as the plaintext. It is of central importance in cryptography because of this, though not widely u or Feistel network systems.

In digital logic design, a two-input xor logic gateA logic gate is an arrangement of electronically-controlled switches used to calculate operations in Boolean algebra. Logic gates can also be constructed from relays, diodes, fluidics and optical elements. Nikola Tesla first filed the patents on an electr is often thought of as a programmable inverter, in that if one input is held at a logic '1', the output will be the inverseInverse typically means the opposite of something. See: Antonym A word with the opposite meaning. Inverse chain rule method Related to integration and differentiation. Inverse element an element x minus;1 so that x x minus;1 x minus;1 x e where is some bi of the other input. Otherwise, if one input is held at logic '0', the output will always be the same as the other input.

The xor operation is a more complex logical function than 'or' and 'and'. Neural networks require an extra processing layer to handle the added complexity.



Read more »

Non User