Search code examples
basicbinary-operatorsstamp

^^ binary operator in basic stamp


We need to mantain a *.bas file (basic STAMP). it contains the following line:

if (x^^y) then

We don't know what is the meaning of "^^" binary operator. (a single "^" is XOR and "^/" is XNOR). It's quite complicated to try to test it on the board.


Solution

  • "^^" is a logical XOR operation, just like "||" and "&&" are OR and AND logical operations.

    "^" operator represents a XOR operation as i said, but it is a bitwise XOR operation, not logical, just like "|" is bitwise OR and "&" is bitwise AND.

    (We burned it on the component.)