Perform subtraction on the given unsigned binary numbers using the 2\'s compleme
ID: 3665849 • Letter: P
Question
Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result should be negative, find its 2's complement and affix a minus sign. 10011 - 10010 4-100010 - 100110 1001 - 110101 101000 - 10101 If the numbers (+9742.782)_10 and (641.218)_10 are in signed magnitude format, their sum is (+10384.000)_10and requires eight digits and a sign. Convert the numbers to binary signed-2's-complement form and find the following sums: (+9742.782) + (+641.218) (+9742.782) + (-641.218) (-9742.782) + (+641.218) (-9742.782) + (-641.218) Do the last problem using binary signed-1's-complement form (remember the end around carry)Explanation / Answer
(a) x=10011 and y =10010
2s complement of y =01101
x-y = 10011-01101 = 01100
(b) x=100010 and y= 100110
2s complemtn of y= 011001
x-y= 100010-011001=101001
(c) x= 1001 and y=110101
2s complement of y = 001010
x-y = 1001-001010=000111
(d) x=101000 and y =10101
2s complemnt of y =01010
x-y=101000-01010=100110
Signed-Complement Representation (for Binary Numbers) In this system, a negative number is always indicated by its complement. This system is more convenient when arithmetic operations are implemented in a computer. The signed-complement system negates a number by taking its complement including the sign bit. The complement of the positive number is taken including the sign bit. Since positive numbers always start with 0 (plus) in the leftmost position, the complement will always start with a 1, indicating a negative number. The signed-complement system can use either the 1’s or the 2’s complement, but the 2’s complement is the most common. As an example, consider the number 9, represented in binary with eight bits. o There is only one way to represent +9 : 0 0 0 0 1 0 0 1 o There are three different ways to represent –9 with eight digits: Signed-magnitude representation of –9 : 1 0 0 0 1 0 0 1 Signed-1’s complement representation –9 : 1 1 1 1 0 1 1 0 Signed-2’s complement representation –9 : 1 1 1 1 0 1 1 1 minus sign Note that all negative numbers have a 1 in the left most bit position. Thus, we can distinguish them from the positive numbers. 1’s complement system is useful as a logical operation, since the change of 1 to 0 or 0 to 1 is equivalent to a logical complement operation, as will be shown in the Boolean algebra chapter. The same procedure can be applied to the 1’s complement system by including the end-around carry as it is done with unsigned numbers.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.