Final answer:
Two's Complement binary numbers can be converted to decimal by checking the sign bit, and appropriate inversions and additions. Decimal to Two's Complement involves converting to binary, and if negative, inverting the digits and adding 1.
Step-by-step explanation:
The question involves converting binary numbers in Two's Complement format to decimal, and vice versa. To convert a Two's Complement binary number to decimal, we check the leftmost bit. If it's 0, the number is positive, and we calculate its value as for a normal binary number. If it's 1, the number is negative, and we find its positive equivalent by inverting the bits and adding 1, then we apply the negative sign.
- 1001 1101 to decimal: As the leftmost bit is 1, it's a negative number. We invert the bits (0110 0010) and add 1 (0110 0011), which gives us 99 in decimal. So the original number is -99.
- 0111 1010 to decimal: The leftmost bit is 0, so it's positive. We directly calculate the decimal value as 122.
To convert a decimal number to Two's Complement binary, we start with the positive binary equivalent. If the number is negative, we then invert the bits and add 1. If it's positive, we make sure it's an 8-bit number by adding leading zeroes if necessary.
- -122 to Two's Complement binary: The binary of 122 is 0111 1010, we invert the bits (1000 0101) and add 1 (1000 0110) giving us 1000 0110.
- +85 to Two's Complement binary: The binary of 85 is 0101 0101, which is already an 8-bit number, so no changes are needed.