Binary XOR
|
Signature |
|---|
|
Binary_Xor(expression1, expression2) |
|
Description |
|---|
|
Does an XOR (Exclusive OR) operation on each bit of expression1 with the corresponding bit of expression2. For the purpose of this operation, the expressions are converted to an unsigned integer. The bitwise XOR can be used to toggle specific bits of a signal. In this case the XOR operation would be used on a signal and a mask constant. The expression: `signal BIT_XOR 0b1000` for example would toggle bit number 3 (i.e. the fourth bit). The mask constant can be written as Binary (with a 0b prefix), Hexadecimal (with an 0x prefix) or as a decimal number. So `0b11001010 = 0xCA = 202` and the following formulas produce the same `signal BIT_XOR 0b11001010` `signal BIT_XOR 0xCA``signal BIT_XOR 202` |
|
Result |
|---|
|
Bitwise XOR of expression1 and expression2. |
|
Arguments |
|
|---|---|
|
expression1 |
An expression which is treated as a binary number. |
|
expression2 |
An expression which is treated as a binary number. Numeric values can be written as binary (with a 0b prefix), hexadecimal (with a 0x prefix) or as a decimal number. |