Bitwise Exclusive Or (XOR)
    The XOR instruction performs a bitwise XOR operation using the bits in Source A and Source B and places the result in Dest.
When enabled, the instruction evaluates the bitwise XOR operation:
  Dest = Source A XOR Source B
| If the bit in
                   Source A is: | And the bit in
                   Source B is: | The bit in
                   Dest is: | 
|---|---|---|
| 0 | 0 | 0 | 
| 0 | 1 | 1 | 
| 1 | 0 | 1 | 
| 1 | 1 | 0 | 
Available Languages 
Ladder Diagram
_v1.png/_jcr_content/renditions/original)
Operands 
     IMPORTANT: 
    Unexpected operation may occur if:
          
- Output tag operands are overwritten
- Members of a structure operand are overwritten
- Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Ladder Diagram
| Operand | Data Type | Format | Description | 
|---|---|---|---|
| Source A | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to XOR with Source B. //Float includes REAL and LREAL data types. Tip:Float inputs are converted to integer which may cause an overflow. | 
| Source B | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to XOR with Source A. Tip:Float inputs are converted to integer which may cause an overflow. | 
| Dest | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | tag | Tag to store result of the instruction. Tip: If the destination type is Float, the resultant value will be converted to Float. | 
     TIP: 
    When integer promotion is required for the inputs, the smaller type is converted to the larger type using 
Affects Math Status Flags
Conditional
See Math status flags.
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
| Condition/State | Action Taken | 
|---|---|
| Prescan | N/A | 
| Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in | 
| Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in Dest is set as described in the Description section. | 
| Postscan | N/A | 
Examples
Ladder Diagram

Provide Feedback