Help


from Wikipedia
« »  
* Complement the result if there is no carry out of the most significant digit ( an indication that x was less than y ).
This is easier to implement with digital circuits than comparing and swapping the operands.
But since taking the radix complement requires adding 1, it is difficult to do directly.
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.
This method is used by computers that use sign-and-magnitude to represent signed numbers .....

2.476 seconds.