### Example of conversion to signed binary of a decimal integer:

Let's convert to signed binary the following integer: -200

-200 = -256 + 32 + 16 + 8 = = -1×2^{8}+ 0×2

^{7}+ 0×2

^{6}+ 1×2

^{5}+ 1×2

^{4}+ 1×2

^{3}+ 0×2

^{2}+ 0×2

^{1}+ 0×2

^{0}= 100111000

_{2}.

### Example of sign extension of numbers in two's complement representation

Let's store the 8 bit number 11100100 on 6 bits:

We remove the first two 1's and the result is 100100. Note that to store a 8 bit number in 6 bits you can simply truncate the upper 2 bits as long as they are all the same as the left-most bit in the resulting 6 bit number - i.e., the sign doesn't change.2's Complement Converter