How are the following numbers represented in 8-bit two’s complement representation? 0 , 1, -1,
10, 50, -50, 126, -126, 130
Guide On Rating System
Vote
In 8-bit two's complement representation, the most significant bit (MSB) is used to represent the sign of the number. If the MSB is 0, the number is positive, and if it is 1, the number is negative.
1. To represent 0:
The binary representation of 0 is 00000000 (all 8 bits are zeros).
2. To represent 1:
The binary representation of 1 is 00000001 (positive number with MSB as 0).
3. To represent -1:
The binary representation of -1 is 11111111 (negative number with MSB as 1).
4. To represent 10:
The binary representation of 10 is 00001010 (positive number with MSB as 0).
5. To represent 50:
The binary representation of 50 is 00110010 (positive number with MSB as 0).
6. To represent -50:
The binary representation of -50 is 11001110 (negative number with MSB as 1).
7. To represent 126:
The binary representation of 126 is 01111110 (positive number with MSB as 0).
8. To represent -126:
The binary representation of -126 is 10000010 (negative number with MSB as 1).
9. To represent 130:
The binary representation of 130 is 10000010 (positive number with MSB as 0).
However, since 130 is greater than the maximum value that can be represented with 8 bits using two's complement (-128 to +127),
it will result in an overflow and the representation will not be accurate.