* XOR operator Truth table: * * left isLeftNull right isRightNull result * ------ ------------ ------- ------------- -------- * T F T F 0 * T F F F 1 * F F T F 1 * F F
| 92 | * - T - T 2 |
| 93 | * */ |
| 94 | struct Xor { |
| 95 | static inline void operation(bool left, bool right, uint8_t& result, bool isLeftNull, |
| 96 | bool isRightNull) { |
| 97 | if (isLeftNull || isRightNull) { |
| 98 | result = NULL_BOOL; |
| 99 | } else { |
| 100 | result = left ^ right; |
| 101 | } |
| 102 | } |
| 103 | }; |
| 104 | |
| 105 | /** |
| 106 | * NOT operator Truth table: |