Why are you comparing bit patterns of 11 and -5? The point is that 5 and -5 have different low order bits, so you cannot just sign extend. Assuming two's complement arithmetic, complement the binary value and add 1 to get the negative. for ones complement just complement (invert the bits). Look at an adder/subtractor. To subtract it does a complement and add. Sign extension is for right shifting to preserve the sign and magnitude of an operand because leading zeroes of a negative number appear as 1 bits. This is not true in the bits that represent the magnitude.