40.6k views
1 vote
Convert the following 8-bit binary numbers in two's complement format to decimal.

a. 01101101
b. 11101100
c. 10101010
d. 01011000

1 Answer

2 votes

Final answer:

To convert 8-bit binary to decimal: flip bits and add 1 for negative, convert directly for positive. Example: 01101101 → 109, 11101100 → -20, 10101010 → -86 and 01011000 → 88.

Step-by-step explanation:

To convert an 8-bit binary number in two's complement format to decimal, follow these steps:

  1. If the most significant bit (MSB) is 1, the number is negative. Find the one's complement by flipping all the bits, then add 1 to get the two's complement.
  2. If the MSB is 0, the number is positive. Simply convert the binary number to decimal.

Using these steps, here are the decimal equivalents of the given binary numbers:

a. 01101101 is positive, so the decimal equivalent is 109.

b. 11101100 is negative. Finding the one's complement gives 00010011, and adding 1 gives the two's complement 00010100. Converting to decimal, the result is -20.

c. 10101010 is negative. Finding the one's complement gives 01010101, and adding 1 gives the two's complement 01010110. Converting to decimal, the result is -86.

d. 01011000 is positive, so the decimal equivalent is 88.

User Ronedog
by
8.0k points