forked from QB64-Phoenix-Edition/QB64pe
-
Notifications
You must be signed in to change notification settings - Fork 0
EQV
Samuel Gomes edited this page Nov 8, 2022
·
1 revision
The EQV operator returns a value based on the equivalence of two conditions or values.
result = firstValue EQV secondValue
- Returns true (-1) when both values are the same (equivalent).
- Turns a bit on if both bits are the same, turns a bit off if both bits are different.
The results of the bitwise logical operations, where A and B are operands, and T and F indicate that a bit is set or not set:
A | B | NOT B | A AND B | A OR B | A XOR B | A EQV B | A IMP B | |
---|---|---|---|---|---|---|---|---|
T | T | F | T | T | F | T | T | |
T | F | T | F | T | T | F | F | |
F | T | F | F | T | T | F | T | |
F | F | T | F | F | F | T | T |
Relational Operations return negative one (-1, all bits set) and zero (0, no bits set) for true and false, respectively. This allows relational tests to be inverted and combined using the bitwise logical operations.