It's worth noting that the bitwise operators do not take sign into account, so as long as you never try to use the long as an actual decimal value the fact that it is signed is not particularly relevant.
–
krispyMar 28 '14 at 16:01