Representation of negative numbers in the binary system
Two methods are touched upon here.
i. Signed binary numbers
ii. Two's complement method

Introduction

Consider a string of 4 bits which is called a nibble.

where 'x' could be a '0' or '1'.
LSB → Least significant bit
MSB → Most significant bit
Similarly, a string of 8 bits is called a byte.

i. Signed binary numbers

To represent a negative number,
the MSB is used as a sign bit.
'0' as MSB represents a positive number.
'1' as MSB represents a negative number.
The remaining 7 bits represent the magnitude of the number.

Ex 1:

The magnitude of the number 0101011
= 0 × 26 + 1 × 25 + 0.2 × 24 + 1 × 23 + 0.22 + 1.21 + 1.20
= 32 + 8 + 2 + 1
= 43
The sign bit at MSB is '0' indicating a positive number.
So the decimal number represented by 00101011 is +43.
Now, if instead of '0' there is a '1' as MSB
i.e, 10101011
then the number represented is – 43.
Such a convention is called signed binary numbers.

Ex 2:

As a signed binary number, what is the decimal equivalent of 11101110 ?
Since '1' is the MSB, it represents negative number.
magnitude is given by the remaining 7 digits i.e, 1101110

So as a signed number
(11101110)2 = (– 110)10

ii. Two's complement method

It is another method of representing negative numbers in binary system which is used in computers.
For the present, it is enough if you know what is 1's compliment and 2's complement of a number.
1's compliment of a binary number is obtained by changing zeroes in it to ones and ones to zeroes.

Ex 1:

1's compliment of 11110010 is 00001101
2's compliment of a number = its 1's compliment + 1

Ex 2:

2's compliment of 11110010 = 00001101 + 1 = 00001110