Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (curry):

Two's complement question.

OpenStudy (dan815):

hi, so instead of just giving you the trick to 2s compliment, do you understand how or why the 2s compliment is constructed?

OpenStudy (curry):

if it's positive, i just keep it the same. and if it's negative, i write the positive number, flip the bits, and add 1 right?

OpenStudy (curry):

I got 9 for both.

OpenStudy (curry):

is that right?

OpenStudy (curry):

well 131 can be represented with just 8, but wouldn't the first number represent negative and postive?

OpenStudy (anonymous):

for twos compliment notation, generally you add a single bit, but there is a special exception

OpenStudy (curry):

or do we not need to worry about signed magnitude arch?

OpenStudy (anonymous):

For example, for two bits we have: 00 = 0 01 = 1 10 = -2 11 = -1 Our range is -2 to 1, which is given by \(-2^{n-1}\) to \(2^{n-1}-1\).

OpenStudy (anonymous):

So 8 bits will support -128 to 127

OpenStudy (curry):

wait why is 10, -2?

OpenStudy (curry):

do we just subtract 1 and flip the bits?

OpenStudy (anonymous):

If you add \(1+-2\), we have \(01 + 10 = 11\) which is \(-1\).

OpenStudy (anonymous):

It wraps around so that addition will still work.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!