Converting from 8 bit to 16 bit

Masterminder picture Masterminder · Oct 21, 2012 · Viewed 14k times · Source

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

Answer

Kevin picture Kevin · Oct 21, 2012

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