Think of the carry flag as a borrow bit when subtraction is performed. It is initialized to 1 so the operation is a−b−C
, i.e., a + not(b) + C
instead of a + not(b) + 1
as you described. In other words, the carry is inverted for subtract so it can be used to do multiple-precision subtract.
Doug Currie
2010-05-24 19:18:39