Subtraction of Unsigned Numbers-2
Since we are dealing with unsigned numbers, there is really no way to get an unsigned result for the second example. When working with paper and pencil, we recognize that the answer must be changed to a signed negative number. When subtracting with complements, the negative answer is recognized by the absence of the end carry and the complemented result.
Subtraction with complements is done with binary numbers in a similar manner using the same procedure outlined above. Using the two binary numbers X = 1010100 and Y = 1000011, we perform the subtraction X - Y and Y - X using 2's complemenfs:
X= 1010100
2' s complement of Y = +0111101
Sum = 10010001
Discard end carry 27 = - 10000000
Answer: X - Y = 0010001
y = 1000011
2's complement of X = +0101 100
Sum = 1101111
There is no end carry
Answer is negative 0010001 = 2's complement of 1101111
Frequently Asked Questions
Recommended Posts:
- DATA TYPES
- NUMBER SYSTEM
- CONVERSION - INTRODUCTION
- OCTAL AND HEXADECIMAL NUMBER CONVERSION
- OCTAL AND HEXADECIMAL NUMBER CONVERSION -2
- Introduction to Decimal Representation
- ALPHANUMERIC REPRESENTATION
- Register Transfer Language -2
- Register Transfer
- Register Transfer -2
- Bus and Memory Transfers
- Bus and Memory Transfers -2
- Three-State Bus Buffers
- Memory Transfer
- Binary Adder