XOR

Performs bitwise XOR operation.

Syntax

XOR1 value1 [in,1], value2 [in,1], result [out,1] ;code:105
XOR2 value1 [in,2], value2 [in,2], result [out,2] ;code:106
XOR4 value1 [in,4], value2 [in,4], result [out,4] ;code:107
XOR8 value1 [in,8], value2 [in,8], result [out,8] ;code:108

Description

This instruction performs bitwise XOR operation: result = value1 XOR value2.

The bitwise exclusive OR instruction compares each bit of its first value to the corresponding bit of its second value. If one bit is 0 and the other bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.

value1   0 0 1 1
value2   0 1 0 1
result   0 1 1 0

NoASM

There are several kinds of these instructions defined in NoASM Compiler:

XOR1,  XOR2,  XOR4,  XOR8,
XOR1u, XOR2u, XOR4u, XOR8u