there are various ways to represent negative numbers in a binary system, why doesnt a computer get confused?
For example, with 3 bits, ones compliment
010 = 2
101 can mean 7 or -2
as far as I can tell, other methods have problems as well
the question is, how do you avoid problems like this? why does a computer know that you're using a negative and not a straight up binary number?
For example, with 3 bits, ones compliment
010 = 2
101 can mean 7 or -2
as far as I can tell, other methods have problems as well
the question is, how do you avoid problems like this? why does a computer know that you're using a negative and not a straight up binary number?