bit shift - What is the difference between operator >> and operator >>> in java? -


i used use >> operator right shifting. i've replaced >>> , found same result. can't figure out whether these 2 fundamentally equal or not.

the first operator sign-extends value, shifting in copy of sign bit; second 1 shifts in zero.

the reason emulate unsigned integers purpose of doing bit operations, partially compensating lack of unsigned integral types in java.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -