Overview
This lecture explains how to interpret a binary sequence in various number representations: unsigned, sign and magnitude, one's complement, and two's complement. It also covers the value ranges for each form.
Interpreting Binary Sequences
- To convert a binary sequence to decimal, assign positional weights: from right, 1, 2, 4, 8, 16, 32, etc.
- Unsigned notation: Add all weighted positions with a 1; e.g., 110011 is 32+16+2+1=51.
- Sign and magnitude: The leftmost bit is the sign (1 = negative, 0 = positive), rest is magnitude; 110011 is negative, magnitude 16+2+1=19, so -19.
- One’s complement: Leftmost bit is sign; if negative, flip all bits and convert; 110011 gives 001100 (12), so -12.
- Two’s complement: Leftmost bit is sign; if negative, flip all bits, add 1, and convert; 110011 flip is 001100 + 1 = 001101 (13), so -13.
Value Ranges for 4-Bit Numbers
- Unsigned: 0 to 15 (2⁴ - 1).
- Sign and magnitude: -7 to +7.
- One’s complement: -7 to +7.
- Two’s complement: -8 to +7.
Generic Value Range Formulas
- Unsigned n bits: 0 to 2ⁿ - 1.
- Sign and magnitude n bits: –(2ⁿ⁻¹ – 1) to +(2ⁿ⁻¹ – 1).
- One’s complement n bits: –(2ⁿ⁻¹ – 1) to +(2ⁿ⁻¹ – 1).
- Two’s complement n bits: –2ⁿ⁻¹ to 2ⁿ⁻¹ – 1.
Key Terms & Definitions
- Unsigned — A binary number where all bits represent magnitude.
- Sign and magnitude — Leftmost bit is sign; rest is value’s magnitude.
- One’s complement — Negative values are bitwise inversions of positives.
- Two’s complement — Negative values are one’s complement plus one.
Action Items / Next Steps
- Practice converting binary sequences into all four representations.
- Memorize range formulas for exam preparation.