Answer:
a) 1011
Explanation:
In 4 bit two's complement representation, the first bit is the sign bit.
If the sign bit is 1, the number is negative.
If the sign bit is 0, the number is positive.
What is the magnitude of the sign bit?
In n-bit two's complement representation, the magnitude of the sign bit is:
So, in 4-bit two's complement representation, the magnitude of the sign bit is:
Since the number is negative, the value of this bit is -8.
The other bits are magnitude bits, positive.
We have that the sum of these bits must be -5, and we already have -8. So what should be the value of these last 3 bits?
First, i am going to solve this equation to find the decimal value of the last three bits.
So, the last three bits are:
The binary encoding of the number -5 is:
a) 1011