code: public static long reverse(long i) {
          // HD, Figure 7-1
          i = (i & 0x5555555555555555L) << 1 | (i >>> 1) & 0x5555555555555555L;
          i = (i & 0x3333333333333333L) << 2 | (i >>> 2) & 0x3333333333333333L;
          i = (i & 0x0f0f0f0f0f0f0f0fL) << 4 | (i >>> 4) & 0x0f0f0f0f0f0f0f0fL;
          i = (i & 0x00ff00ff00ff00ffL) << 8 | (i >>> 8) & 0x00ff00ff00ff00ffL;
          i = (i << 48) | ((i & 0xffff0000L) << 16) |
              ((i >>> 16) & 0xffff0000L) | (i >>> 48);
          return i;
      }
docs: Returns the value obtained by reversing the order of the bits in the
  two's complement binary representation of the specified {@code long}
  value.
  
  @param i the value to be reversed
  @return the value obtained by reversing order of the bits in the
  specified {@code long} value.
  @since 1.5