Overview
This lecture explains how to represent negative numbers in binary using the one's complement method, including examples and a brief mention of hardware complexity.
One's Complement Representation
- Positive numbers are represented in binary with four bits; the most significant bit (MSB) indicates the sign (0 for positive).
- Example representations: +0 is 0000, +1 is 0001, through +7 as 0111.
- Negative numbers are obtained by flipping every bit (one's complement) of the positive number.
- Example: +0 (0000) becomes -0 (1111), +1 (0001) becomes -1 (1110), +2 (0010) becomes -2 (1101), etc.
- This method results in two zeros: +0 (0000) and -0 (1111).
Example Calculation: 5 - 5 Using One's Complement
- +5 in binary is 0101; -5 in one's complement is 1010.
- Adding 0101 and 1010 gives 1111, which represents negative zero in one's complement.
- The operation correctly computes to zero, but the result is the negative zero form.
Drawbacks of One's Complement
- Requires nearly twice the hardware compared to two's complement for operations.
- Handling both positive and negative zero adds complexity.
Key Terms & Definitions
- One's Complement — A method to represent negative binary numbers by flipping all bits of the positive counterpart.
- Most Significant Bit (MSB) — The highest-order bit in a binary number, used here as the sign bit.
- Negative Zero — A unique representation (all bits 1) that exists only in one's complement systems.
Action Items / Next Steps
- Review the process of converting positive numbers to their one's complement negative forms.
- Prepare to study the two’s complement method and its advantages in the next lecture.