posted 23 years ago
Hi Sandy.The number -5 will be represented as 1111 1111 ...1011.After shifting to the left 29 times,the 0 will be in the MSB position.Now the number will be 0110 0000 ...0000 ;a positive number.The value will be (2 raised to 30 + 2 raised to 29) ie 1610612736.
Try doing the mathematics with paper and pencil,and u will get it.
[This message has been edited by Udayan Naik (edited January 19, 2001).]
Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform