0

How do I go about converting -2 decimal to two's compliment in 7 bits? I know in 8 bit representation -2 is 11111110 but for 7 bit I am confused?

Adam
  • 21

1 Answers1

0

It's the same number, but one less $1$.

qwr
  • 10,716
  • so would it be 1111110? – Adam May 04 '14 at 05:09
  • @Adam yes, from the definition of 2's complement – qwr May 04 '14 at 05:10
  • and if so then what would be the highest and lowest integer that can be represented by this 7 bit situation? would it be 2^7=64 and 2^0 which equals 1? – Adam May 04 '14 at 05:11
  • @Adam It would be $-2^6$ to $2^6 - 1$. I suggest reading about it: http://en.wikipedia.org/wiki/Two's_complement – qwr May 04 '14 at 05:13