Converting from 8 bit to 16 bit
-
13-07-2021 - |
Question
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow