ulong hi = (value & 0xFFFFFFFF00000000) >> 32; ulong lo = (value & 0xFFFFFFFF);
alert(Math.pow(2,32) << 1 === Math.pow(2,32) >> 1)
Bummer, but at least I know the rules of the game - 2\^32 == badness, 2\^31 or less == goodness.
So, imagine my surprise when I ran this code...
alert((Math.pow(2,31) & Math.pow(2, 31)) === Math.pow(2, 31))