The 4-bit two’s complement value 1011 is sign-extended to 8 bits. What is the result?

Correct answer B. 11111011

Explanation

Sign extension copies the sign bit into all new high-order positions, so 1011 (-5) becomes 11111011, which is still -5. Padding with zeros (00001011) would turn it into +11, which is zero extension and is only correct for unsigned values. 10001011 is how a sign-magnitude number would be widened. Sign extension is what instructions use when loading a signed byte into a wider register.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.