ok, but that does not help when I am converting binary to decimal since 11111111 11111111 11111111 00000010 is converted to the decimal form of 18446744073709551362. is there a way that I can check this? I want to check my homework before I turn it in.
When you do that, simply NOT the number and add 1, then convert to decimal and invert the sign.
Example:
Negative number (bit 31 is set):
11111111 11111111 11111111 00000010
NOT:
00000000 00000000 00000000 11111101
+1:
00000000 00000000 00000000 11111110
To base 10:
254
Sign inversion:
-254
Positive number (bit 31 is not set):
01111111 11111111 11111111 00000010
To base 10:
2147483394