Timeline for answer to What is “two's complement”? by ForDummies
Current License: CC BY-SA 4.0
Post Revisions
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 9, 2025 at 21:00 | comment | added | supercat | It would indeed cause an overflow. Using a 4-bit value, the arithmetic inverse of -8, i.e. ...11111111 1000 (with the leading 1's being copies of the leftmost represented bit) should be +8, i.e. ...00000000 1000, but the leading bits would not be copies of the leftmost represented bit. | |
| Sep 9, 2025 at 18:37 | comment | added | RokeJulianLockhart | @supercat Would that cause an overflow? (I presume that that situation has been considered already by those who devised the system.) | |
| Aug 5, 2019 at 21:45 | comment | added | supercat | If a number ends with 11000...000, inverting it will yield 01000...000. Two's-complement notation is based on the idea that all digits to the left of the leftmost represented digit should have the same value as that digit, but when inverting a number whose representation is 1000...000, that won't be true. | |
| Oct 21, 2018 at 15:48 | comment | added | Abhishek Pathak | While other answers focus on the "how", this answer leads us gently with the "why". It helped me. Thanks! | |
| May 11, 2018 at 19:03 | history | edited | cerberos | CC BY-SA 4.0 |
added explanation of 'high-order bit'
|
| Jul 12, 2017 at 19:56 | comment | added | NH. | Good job mentioning the oddball number that doesn't have an inverse. But what do we do about this? Do we just set the overflow flag if someone tries to invert it? | |
| Jul 9, 2017 at 9:18 | comment | added | user188757 | I like this answer as well. Especially where you show how the negative number is figured. Here I thought the whole number was inverted, not just the MSB and then added back the other weighted values. Thank you, this solved my brain block | |
| Jun 7, 2017 at 8:37 | comment | added | jonsno | I like this answer! Explains how taking 2s complement and adding one works. | |
| Sep 26, 2012 at 21:36 | review | Late answers | |||
| Oct 2, 2012 at 2:27 | |||||
| Sep 13, 2012 at 22:19 | review | First posts | |||
| Sep 17, 2012 at 20:40 | |||||
| S Aug 18, 2012 at 20:39 | history | answered | ForDummies | CC BY-SA 3.0 | |
| S Aug 18, 2012 at 20:39 | history | made wiki | Post Made Community Wiki by ForDummies |