15 213 Recitation 2 1 29 01 Outline Integer Representations Integer Arithmetic Examples Homework Practice Shaheen Gandhi e mail sgandhi andrew cmu edu Office Hours Wednesday 1 30 2 30 Integer Representations Unsigned Pros Large Integer Space Only Represents Positive Integers Cons Range 0 2n 1 Integer Representations Signed Magnitude Pros Get Negative Numbers to play with Easy to understand Two Zeroes Smaller Integer Space than Unsigned Cons Range 2n 1 1 2n 1 1 Integer Representations Two s Complement Pros Easy for hardware implementation Math operations are intuitive Easy enough for a programmer to deal with Because everyone else uses it A little bit confusing at first Cons Range 2n 1 2n 1 1 Integer Arithmetic Two s Complement Arithmetic Which of the following overflow or underflow 0110 0110 1110 0011 0001 1011 1001 0111 0011 ye s no no
View Full Document