Lecture17 - Review for Test2 1. Unsigned binary subtraction...

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

View Full Document Right Arrow Icon
Chapter 6 - Part 2 1 Review for Test2 1. Unsigned binary subtraction by 2s complement addition. Given the two unsigned binary numbers X=1010100 and Y=1000011, perform the subtraction X – Y and Y – X using 2s complement operations.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Chapter 6 - Part 2 2 Subtraction with 2’s Compleme nt ± For n-digit, unsigned numbers M and N, find M N in base 2: Add the 2's complement of the subtrahend N to the minuend M: M + (2 n N) = M N + 2 n If M > N, the sum produces end carry r n which is discarded; from above, M N remains. If M < N, the sum does not produce an end carry and, from above, is equal to 2 n ( N M ), the 2's complement of ( N M ). To obtain the result (N – M) , take the 2's complement of the sum and place a to its left.
Background image of page 2
Chapter 6 - Part 2 3 2. Signed binary arithmetic operations ± The following 6-bit binary numbers have a sign in the leftmost position and, if negative, are in 2’s complement form. Perform the indicated arithmetic
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/03/2009 for the course CS 20910 taught by Professor Taoxie during the Spring '09 term at San Diego State.

Page1 / 13

Lecture17 - Review for Test2 1. Unsigned binary subtraction...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online