152k views
2 votes
What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, and include a negative sign if necessary)

1 Answer

2 votes

Answer:

-80

Explanation:

We have: 1 0 1 1 0 0 0 0

Then we assign to each digit the corresponding power of 2.

See it in a table:


\begin{matrix}1&0&1&1&0&0&0&0\\2^7&2^6&2^5&2^4&2^3&2^2&2^1&2^0 \end{matrix}

Then multiplying each digit by its corresponding power of 2 and then adding the results, we get:


-2^7+2^5+2^4

Notice the very first digit to the left corresponding to the
2^7 power should be negative according to the format of two’s complement representation.

We get:


-128+32+16=-80

User Matthieu Brucher
by
6.1k points