signedtwos-complement

Converting from 8 bit to 16 bit


I was wondering how do you convert from an 8 bit 2's complement to a 16 bit 2's complement signed number?

1100 0110 is an example


Solution

  • It's called sign extending. You simply repeat the most significant bit until you have the right number of bits. For your example, it would be 1111 1111 1100 0110