3 Representing Numbers HOF 3.pdf

3 Representing Numbers HOF 3.pdf - More Examples of...

Info icon This preview shows pages 1–3. Sign up to view the full content.

EECS 1520 Week 4.2 January 24, 2018 page 1 More Examples of Arithmetic in Ten's Complement +5 05 -4 96 + -6 + 94 + +6 + 06 -1 99 +2 02 -2 98 -5 95 95 + -4 + 96 - +3 - 03 + 97 -6 94 -8 92 subtraction reduces to addition because A B = A + ( B) easy to convert a positive number to its negative counterpart, and a negative number to its positive counterpart. Two's Complement Representation negative numbers are represented by: x x n 2 used in computers because subtraction reduces to addition simpler circuits
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

EECS 1520 Week 4.2 January 24, 2018 page 2 To form a negative number: start with the positive version of the number flip the bits: 0 1 and 1 0 add 1 to the number produced in the previous step This is what the evaluation of x n 2 reduces to in binary arithmetic. Rewrite this as 1 1 2 x n . Evaluating x n 1 2 is equivalent to “flipping the bits (binary digits)” in x . All that remains is to add the 1 back in that was removed earlier.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern