I know why i'm getting 111111111111111111111111
Its because longs use 2's compliment for negative numbers, so:
-1 = 11111111 11111111 11111111 11111111
-2 = 11111111 11111111 11111111 11111110
-3 = 11111111 11111111 11111111 11111101
and so on
I was just surprised that since PBP now supports signed longs, that they didnt build in support for doing something as simple as shifting without messing up the signing
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks