Home     Blog

XOR (Exclusive-OR)

 XOR (Exclusive OR)

XOR is known as ‘Exclusive-OR’ and it is a Boolean operator that returns a TRUE when only one of the operands is TRUE and returns a FALSE when both of the operands are either TRUE or FALSE. It is a logical operation on two logical values. Going by the rules of material implication and material equivalence, the exclusive-or is equivalent to the negation of the logical bi-conditional.

Properties

  • XOR is an associative operation i.e. re-arranging the parenthesis in an expression having two or more same associative operators in a row does not change the end result. The end result is not affected by the order in which the operations are performed.
    ( p + q ) + r = p + ( q + r )
  • XOR is a commutative operation i.e. the end result is not affected by the order of the terms.
    p + q = q + p
  • It is a linear binary function.

Usage

  • Exclusive-OR is used in bitwise operations to check whether the two bits are equal or not.
    In logical circuits, a XOR gate can be used to generate a simple adder to add the numbers.
  • In computer graphics, XOR based drawing methods are generally used to manage items like cursors.
  • It is used in signed binary arithmetic operations to detect the overflow.
  • It is also used for creating parity information in RAID 3-6.
VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
Follow Will.Spencer on

Leave a Reply

Related Posts

  • XOR Encryption

    The XOR encryption is a simple symmetric cipher that is used in many applications where security is not a defined requirement. The XOR Operator XOR (Exclusive OR) is a bitwise operator from binary mathematics. The six bitwise operators, as defined in the C programming language, are: Operation Symbol AND & Inclusive OR | Exclusive OR [...]...


  • Logical Structure of an Active Directory

    Active Directory fulfills all the needs of an organization by designing a directory structure. It provides flexibility in designing the business structure according to current and future needs for an organization, so it should be examined prior to installing active directory. In Active Directory, resources are organized in a logical structure, and this grouping of [...]...


  • Java Operators

    Java Operator Operator Description [ ] Array index () Method call . Member access ++ Prefix or postfix increment -- Prefix or postfix decrement + - Unary plus, minus ~ Bitwise NOT ! Boolean (logical) NOT (type) Type cast new Object creation * / % Multiplication, division, remainder + - Addition, subtraction + String concatenation [...]...