problem of negative sign in conversion of hexadecimal to decimal.
843785Jul 24 2008 — edited Jul 25 2008class D {
public static void main (String args[]) {
int i= 0x80000000;
int j=0x7FFFFFFF;
System.out.print(i+" , "+j);
}}
The value of 'i' = 8*(16^7) =2^31 i.e. 2 raised to power 31.
But it prints -2^31= -2147483648. My problem is that how we are getting a negative sign in 'i' ?
while On printing 'j' we get a positive value.