コード例 #1
0
            private static ulong RShift(ulong num, ulong n)
            {
                var highbits = (ulong)0;

                if ((num & Scrambler.Pow(2, 31)) != 0)
                {
                    highbits = (Scrambler.Pow(2, n) - 1) * Scrambler.Pow(2, 32 - n);
                }
                return((num / Scrambler.Pow(2, n)) | highbits);
            }
コード例 #2
0
 private static ulong LShift(ulong num, ulong n)
 {
     return((num * Scrambler.Pow(2, n)) % Scrambler.Pow(2, 32));
 }