Bitwise Operations - MinecraftPhi/MinecraftPhi-modules GitHub Wiki

The bitwise operations take two parameters, $phi.bitwise.a and $phi.bitwise.b which are both fakeplayers on the phitemp objective, and may be modified by the function. The result of the operation is put in $phi.bitwise.result on the same objective

Functions:

  • phi.bitwise:and, perform a bitwise and between the two parameters
  • phi.bitwise:lshift, shift $phi.bitwise.a left by $phi.bitwise.b bits, filling in the right bits with 0
  • phi.bitwise:not, perform a bitwise not on $phi.bitwise.a
  • phi.bitwise:or, perform a bitwise or between the two parameters
  • phi.bitwise:rshift_sign_propagating, shift $phi.bitwise.a right by $phi.bitwise.b bits, filling in the left bits with the sign of $phi.bitwise.a
  • phi.bitwise:rshift_zero_filling, shift $phi.bitwise.a right by $phi.bitwise.b bits, filling in the left bits with zeroes
  • phi.bitwise:xor, perform a bitwise exclusive or between the two parameters