class Q {
public static void main(
String [] args) {
int x = 0x80000000;
System.out.print(x );
}
}
answer is -2147483648 if we take bit representation of hexa number 800000000 as
1000 0000 0000 0000 0000 0000 0000 0000.
But I always do my calculation like
1000 0000 0000 0000 0000 0000 0000 0000.(here we are just having 28 bits)so the remaning 4 bits are the begginnnig 0�s.
0000 1000 0000 0000 0000 0000 0000 0000 0000.(now the sign bit is positive,since it is positive ,my result is always 2147483648.i end up my calculation like this.)
Please help me.