THE TWO'S COMPLEMENT negation is flip-and-add-one; sign is a point of view
On a fixed width, negate by flipping every bit and adding one: −x = ~x + 1. The very same bit pattern is two numbers at once — an unsigned value and a signed one — depending only on how you read the top bit; the number line is bent into a ring where −x and 2ⁿ−x are the same place. This duality is why one adder does both addition and subtraction, with no separate hardware for the sign.
THE TECHNIQUE −x = ~x + 1 ; one bit pattern, two readings (signed / unsigned)
Pick a byte and negate it by ~x+1; confirm it equals 256−x (the ring wrapping), and read the same bits as both an unsigned and a signed number: live demo
HISTORY & CREDIT method of complements; EDVAC 1945
“Subtraction needs its own circuitry.” — no; because −x = ~x+1 bends the integers into a ring, a − b is just a + (~b+1) — one adder, no borrow logic. The signed/unsigned split is a reading of the same bits, not a different machine. cited
1600s–1800s · method of complements — mechanical calculators subtract by adding the complement (nine's/ten's complement). 1945 · von Neumann, EDVAC — two's complement proposed for a binary stored-program computer: negation as bit-flip-plus-one. now · nearly every CPU uses it; one ALU adder serves add and subtract, signed and unsigned alike.
The same eight bits are an unsigned count and a signed integer at once — the reading is the only difference. Two numbers in one pattern, joined at the top bit: the representation is a duality. two's complement
RECOMMEND FOR I-13 −x = ~x+1 = 256−x, both readings, computed
On the canonical compiler, negating a byte by (x^255)+1 equals 256−x exactly, and the resulting bits read as the signed negative:
$ i13 run twoscomp.i13 # 8-bit, NOT x = x^255
neg8(5) = (5^255)+1 = 251 256 - 5 = 251 difference = 0
signed(251) = -5 -- SAME bits 11111011, read as signed
neg8(100) = 156 256 - 100 = 156 difference = 0
Recommend: two's complement is LIT and native to I-13 — verified −x = (x^255)+1 = 256−x (e.g. 5 → 251, 100 → 156, difference 0), and that the bits 251 = 11111011 read as signed −5. One adder, two readings, the number line bent into a ring — the representation itself is the duality.