Ask Question
12 April, 03:40

xpress the negative value - 22 as a 2's complement integer, using eight bits. Repeat it for 16 bits and 32 bits. What does this illustrate with respect to the properties of sign extension as they pertain to 2's complement representation?  8 bit The 8-bit binary representation of 22 is 00010110. So, - 22 in 2's complement form is (NOT (00010110) + 1) = (11101001 + 1) = 11101010

+5
Answers (1)
  1. 12 April, 04:07
    0
    A negative binary number is represeneted by its 2's complement value. To get 2's complement, you just need to invert the bits and add 1 to it. So the formula is:

    twos_complement = ~val + 1

    So you start out with 22 and you want to make it negative.

    22₁₀ = ‭0001 0110‬₂

    ~22₁₀ = ‭1110 1001‬₂ inverting the bits

    ~22₁₀ + 1 = ‭1110 1010‬₂ adding 1 to it.

    so - 22₁₀ = = ~22₁₀ + 1 = = ‭1110 1010‬₂

    Do the same process for 16-bits and 32-bits and you'll find that the most significant bits will be padded with 1's.

    -22₁₀ = ‭1110 1010‬₂ 8-bits

    -22₁₀ = ‭1111 1111 1110 1010‬‬₂ 16-bits

    -22₁₀ = ‭‭1111 1111 1111 1111 1111 1111 1110 1010‬‬‬₂ 32-bits
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “xpress the negative value - 22 as a 2's complement integer, using eight bits. Repeat it for 16 bits and 32 bits. What does this illustrate ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers