I am reading the book art of assembly language. There I came across this paragraph.
If the H.O. bit is zero, then the number is positive and is stored as a
standard binary value. If the H.O. bit is one, then the number is
negative and is stored in the two’s comple-ment form. To convert a
positive number to its negative, two’s complement form, you use the
following algorithm:
1) Invert all the bits in the number, i.e., apply the logical NOT function.
2) Add one to the inverted result.
For example, to compute the eight bit equivalent of -5:
0000 0101 Five (in binary)
1111 1010 Invert all the bits.
1111 1011 Add one to obtain result.
.
Here I want to know if 0000 0101 is 5 in decimals and 1111 1011 is -5 then how we represent 251?
Is not the same 1111 1011? How the computer distinguishes between -5 and 251?