哪位朋友告知一下js中>>位移与>>>位移有何区别?越详细越好,千万不要说是一样的效果,因为我看了QQMD5加密中用到了>>>当我把>>>变成>>后得到的结果都变化了,所以肯定是有区别的,只是我不知道.

解决方案 »

  1.   

    >>带符号右移     (n>>2       将整型值带符号右移2位   )   
    <<带符号左移     (n<<2       将整型值带符号左移2位   )   
    >>>无符号右移   (n>>>2     将整型值无符号右移2位   )随便GOOGLE出来的结果
      

  2.   

    The >>> operator is just like the >> operator, except that the bits shifted in on the left are always zero, regardless of the sign of the first operand. For example, -1 >>4 evaluates to -1, but -1 >>> 4 evaluates to 268435455 (0x0fffffff).From JavaScript: The Definitive Guide.