java - what's the difference between bitwise shift with 2 arrows and 3 arrows? -
this question has answer here:
i've seen >>
, >>>
before. what difference , when use each?
double arrows ">>" , triple arrows ">>>" defined on 32-bit integers, performing these on variable "convert" them so-to-speak non-numbers, numbers. additionally, javascript numbers stored double precision floats, these operations cause lose precision bits higher 32 . ">>" maintains sign bit (result signed integer), while ">>>" not (result unsigned integer).
http://msdn.microsoft.com/en-us/library/342xfs5s%28v=vs.94%29.aspx
for better explanation: https://stackoverflow.com/a/1822769/780399
Comments
Post a Comment