Additive method of subtraction the direct method of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ng 14 i0 (= 011102) from 21,o (101012) which gives 7,o (= 001112). Example 5.5. Subtract 01110002 from 10111002. Solution: Borrow 2 1011100 -0111000 0100100 The result may be verified by subtracting 56 10 (= 01110002) from 9210 (= 10111002), which gives 36,0 (= 01001002). Additive Method of Subtraction The direct method of subtraction using the-borrow concept seems to be easiest when we perform subtraction with paper and pencil. However when subtraction is implemented by means of digital components, this method is found to be less efficient than the additive method of subtraction. It may sound surprising that even subtraction is performed using an additive method. This method of subtraction by an additive approach is known as complementary subtraction. In order to understand complementary subtraction, it is necessary to know what is meant by the complement of a number. For a number, which has n digits in it, a complement is defined as the difference between the number and the base raised to the n th power minus one. The definition is illustrated with the following examples: Example 5.6. Find the complement of 37 Solution: Since the number has 2 digits and the value of base is 10, (Base)"-l = 102-1=99 Now 99 - 37 = 62 Hence, the complement of 3710 = 6210. Example 5.7. Find the complement of 6g. Solution: Since the number has 1 digit and the value of base is 8, (Base)n - 1 = 81 - 1 = 710 Also 68 = 610 Now 710 - 610 = 110 =18 lg Hence, the complement of 68 = l8. Example 5.8. Find the complement of IOIOI2. Solution: Since the number has 5 digits and the value of base is 2, (Base)n-l=25-l=3110 Alsol01012 = 2110 Now 31io- 21io = lO10 = 10102 Hence, the complement of 101012= 010102. Observe from Example 5.8 that in case of binary numbers, it is not necessary to go through the usual process of obtaining complement. Instead, when dealing with binary numbers, a quick way to obtain a number's complement is to transform all its 0's to l's, and all its l's to 0's. For example, the complement o...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online