Subtraction using 9′s and 10′s complement

Let us first see how to convert decimal number to 9′s and 10′s complement. 9′s complement of decimal number can be obtained by ((10n - 1)-number) where n represents the number of digits in given number. 10′s complement can be obtained by (10n – number) where n represents the number of digits in given number.

Consider -  (1234)10 9′s complement = 104-1-1234 = 9999-1234 = 8765

10′s complement = 104-1234 = 8766 Continue reading