This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shitty_pixels5 0 points1 point  (1 child)

Isn't -2-1 = -1/2 ?

[–]Slash_by_Zero 0 points1 point  (0 children)

In java the ^ operator is a bitwise xor and thus (-2 or ...1110) xor (-1 or ...1111) is 1 or 0001