Page "Method of complements" Paragraph 56
from
Wikipedia
* Complement the result if there is no carry out of the most significant digit ( an indication that x was less than y ).
Fortunately, a trick can be used to get around this addition: Instead of always setting a carry into the least significant digit when subtracting, the carry out of the most significant digit is used as the carry input into the least significant digit ( an operation called an end-around carry ).
So if y ≤ x, the carry from the most significant digit that would normally be ignored is added, producing the correct result.
And if not, the 1 is not added and the result is one less than the radix complement of the answer, or the diminished radix complement, which does not require an addition to obtain.
Page 1 of 1.
2.476 seconds.