{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

3 Representing Numbers HOF 3.pdf

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full Document Right Arrow Icon
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.
Background 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 ]}