0

I understand why two's complement works (we're working modulo $2^n$). Now, in one's complement we work modulo $2^n-1$. Also, because of this, we get two representations for zero because $1111$ is congruent to $0000$ modulo $2^n-1$. What I don't understand is, why does we need to do end-arround-carry? Why does it work?

LearningMath
  • 851
  • 4
  • 15
  • 38
  • Possible duplicate of [Reason for end around carry to do](https://stackoverflow.com/questions/12952883/reason-for-end-around-carry-to-do) – CBroe Mar 14 '18 at 13:43
  • I've read that question and still don't understand why it works. – LearningMath Mar 14 '18 at 13:44
  • No one here can know what you already read, if you completely fail to mention it. Please explain what exactly your trouble with understanding this is then. – CBroe Mar 14 '18 at 13:47
  • For example, I understand why we can throw that one bit in two's complement (because it represents 2^n which when added to the other n-1 bits gives the same result modulo 2^n). But I don't understand why we have to add one when a carry bit occurs in one's complement. – LearningMath Mar 14 '18 at 13:56
  • @CBroe Maybe because in modulo 2^n-1 if we have end-arround-carry, which means adding 2^n, it's the same as adding one because 2^n is congruent to one? – LearningMath Mar 14 '18 at 14:07

0 Answers0