Everything About ___
Live briefing

Everything about Two's complement

Binary representation for signed numbers

Two's complement is the most common method of representing signed integers on computers, and more generally, fixed point binary values. As with the ones' complement and sign-magnitude systems, two's complement uses the most significant bit as the sign to indicate positive (0) or negative (1) numbers, and nonnegative numbers are given their unsigned representation ; however, in two's complement, negative numbers are represented by taking the bit complement of their magnitude and then adding one. The number of bits in the representation may be increased by padding all additional high bits of negative or positive numbers with 1's or 0's, respectively, or decreased by removing additional leading 1's or 0's. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Two's complementA 5-minute orientation
  2. Skim a recent paper: COSMOS2020: A Panchromatic View of the Universe to z ∼ 10 from Two Complementary CatalogsInfluential work since 2022
  3. Pick up a classic book: Les confessionsThe most-reprinted book on the subject
  4. Read the landmark paper: Two HLA-linked loci controlling the fourth component of human complement.Cited 201 times
  5. Go sideways: Signed number representationsA closely related topic
  6. Go sideways: Ones' complementA closely related topic

📖 Definitions

Noun The number obtained by complementing every bit of a given number and adding one. A number and its complement add to 2, where n is the word size of the machine.

Noun The convention by which bit patterns with high bit 0 represent positive numbers from 0 to 2n−1−1 directly, while bit patterns with high bit 1 represent negative numbers from −1 to −2n−1, n being the word size of the machine, and the numeric complement of a number is its two's complement.

🏆 Landmark papers (most cited)

🆕 Influential since 2022

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics