Answer:
Step-by-step explanation:
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