Signed Numbers: Two's Complement and Biased Notation

📑 Navigation

  1. Key Takeaways
  2. The Problem: Representing Negative Numbers
  3. Sign-Magnitude Representation
  4. Two's Complement Solution
  5. Converting to Two's Complement
  6. Range and Asymmetry
  7. Addition with Two's Complement
  8. Overflow Detection
  9. Biased Notation (Offset)
  10. Floating-Point Application
  11. Powers of Two Reference

Key Takeaways

🎯 Main Takeaway #1: Two's complement allows us to use the same addition circuitry for both positive and negative numbers. Just add normally, and the overflow bit can be ignored.

🎯 Main Takeaway #2: Biased notation shifts the entire range by a fixed offset, making all representations positive. Essential for floating-point exponents.

✅ Unsigned N bits: 0 to 2^N - 1

✅ Sign-magnitude wastes a bit pattern (two zeros: +0 and -0)

✅ Two's complement formula: Invert all bits, then add 1