i don't understand the following senario for the shift operator:
the result of this code is -128, i'll try to explain it, if i am wrong please correct me:
1) 1 is coverted to binary ---> 0000 0001
2) 1 << 7 ---> 1000 0000
3) now
java thinks that the number is negative.
4) to convert a -ve number to it's decimal value we transfer it to it's 2nd complement and add 1
5) 2nd comp ---> 1111 1111
6) adding one (the part i don't get)---> 0 !!!