Skip to Main Content
AVEVA Product Feedback


Status No status
Created by Guest
Created on Aug 20, 2022

XOR operator for expression analyses

AF (and PE) expressions currently have AND and OR operators. These work either logically or (if both operands are integer) in a bitwise fashion. There should also be an XOR operator that works the same way, to avoid the messy construct (A AND NOT B) OR (B AND NOT A). Also, since NOT only returns true/false (rather than complement if an integer) there is no way to implement XOR in a bitwise fashion. So functions or operators ('~' anyone?) to do one's and two's complement would be useful too.
  • Attach files
  • Guest
    Reply
    |
    Aug 20, 2022
    For Boolean (logical) operands A and B, A XOR B is the same as A <> B. That is probably why many programs do not include XOR. In what cases would bitwise operations of any sort be useful in PI? Why are bitwise XOR, one's complement, and two's complement of particular interest?