In java, a number of shift left by n bits, this number is multiplied by 2 ^ n, this right is divided by 2 ^ n.
Such as:
8>>2 = 2 (8/2^2)
15 << 3 = 120 (15*(2^3))
2 & 3 = -2 (minus the complement is also involved in operation)
In java, a number of shift left by n bits, this number is multiplied by 2 ^ n, this right is divided by 2 ^ n.
Such as:
8>>2 = 2 (8/2^2)
15 << 3 = 120 (15*(2^3))
2 & 3 = -2 (minus the complement is also involved in operation)