Digital Arithmetic
51
11011011
+ 11101110
11001001
• The final carry in the ninth bit position is disregarded.
• The decimal equivalent of (11001001) 2 , which is in 2’s complement form, is −55, which is the
correct answer.
It may also be mentioned here that, in general, 2’s complement notation can be used to perform
addition when the expected result of addition lies in the range from −2
n−1 to +(2
n−1
− 1), n being
the number of bits used to represent the numbers. As an example, eight-bit 2’s complement arithmetic
cannot be used to perform addition if the result of addition lies outside the range from −128 to +127.
Different steps to be followed to do addition in 2’s complement arithmetic are summarized as follows:
1. Represent the two numbers to be added in 2’s complement form.
2. Do the addition using basic rules of binary addition.
3. Disregard the final carry, if any.
4. The result of addition is in 2’s complement form.
Example 3.1
Perform the following addition operations:
1. (275.75) 10 + (37.875) 10
2. (AF1.B3) 16 + (FFF.E) 16
Solution
1. As a first step, the two given decimal numbers will be converted into their equivalent binary
numbers (decimal-to-binary conversion has been covered at length in Chapter 1, and therefore the
decimal-to-binary conversion details will not be given here):
(275.75) 10 = (100010011.11) 2 and (37.875) 10 = (100101.111) 2
The two binary numbers can be rewritten as (100010011.110) 2 and (000100101.111) 2 to have the
same number of bits in their integer and fractional parts. The addition of two numbers is performed
as follows:
100010011110
000100101111
100111001101
The decimal equivalent of (100111001.101) 2 is (313.625) 10 .
Précédent

- 72/741

Suivant