Inverted Unsigned binary to decimal coverstion

Aug 16 2023 10:01 AM
int main() {
    unsigned int a=10;

     a=~a;
    printf("%u",a);

    return 0;
}

Why the answer of the program is 4294967285 and not 65525. 

binary value for 10 is = 0000 0000 0000 1010. If I invert the value I get 1111 1111 1111 0101. If I convert this value to decimals, I get 65525. 


Answers (4)