I’m converting an old java program to Xojo, and have run across a few lines of bit operations that I need to make sure are exactly correct in the resulting Xojo code.

Here’s one: `((prevNibble ^ currentIndex++) << 4 | highNibble) + 593`

And another: `i &=15`

As I understand things, in english the first one is doing an exclusive OR with prevNibble and currentIndex++, then shifting that result 4 to the left, then ORing that result with whatever is in highNibble, and finally adding 593 to the whole thing.

The second one is just doing an “And equals” operation - i AND EQUALS 15.

So, anyone feel like taking a stab at how to do this in Xojo?

Thanks!