Also, there is no overflow happening. 128<<8 = 1000000000000000 in binary. Since a short is signed, this is actually -32768 in two's compliment binary.
Also, there is no overflow happening. 128<<8 = 1000000000000000 in binary. Since a short is signed, this is actually -32768 in two's compliment binary.