15-213 Recitation 2 – 1/29/01Integer Representations: UnsignedInteger Representations: Signed MagnitudeInteger Representations: Two’s ComplementInteger Arithmetic: Two’s Complement Arithmetic15-213 Recitation 2 – 1/29/01Outline•Integer Representations•Integer Arithmetic Examples•Homework PracticeShaheen Gandhie-mail: [email protected] Hours: Wednesday 1:30 – 2:30Integer Representations: UnsignedPros+Large Integer SpaceCons-Only Represents Positive IntegersRange120n ...Integer Representations:Signed MagnitudePros+Get Negative Numbers to play with+Easy to understandCons-Two Zeroes-Smaller Integer Space than UnsignedRange12 ... 1)-(2-1n-1n-Integer Representations:Two’s ComplementPros+Easy for hardware implementation+Math operations are intuitive+Easy enough for a programmer to deal with+Because everyone else uses it…Cons-A little bit confusing at firstRange12 ... 2-1n-1n-Integer Arithmetic:Two’s Complement Arithmetic0110+ 00111110- 10110110+ 0001Which of the following overflow (or underflow)?1001 0111
View Full Document