News for hackers. Stuff that matters.
Re:Finally Getting Two's Complement by masswerk on Saturday June 24, 2023 @01:28PM (#36460746)
Interesting cultural differences here: the way I learned it, you increment the next digit of the subtrahend (the lower number) on digit underflow, rather than borrowing from the next digit in the minuend. (So it's rather a carry than borrowing.) Anyways, explicit borrow does for a nice explanation.
Re:Finally Getting Two's Complement by ziml77 on Saturday June 24, 2023 @06:09PM (#36463102)
That is interesting! I could see that make learning it easier since it's closer to addition if you carry instead of borrow. Though one advantage I see to the borrow is, since you're modifying the minuend, you have room to write the modified value of the digit directly above itself.
Re:Finally Getting Two's Complement by masswerk on Saturday June 24, 2023 @06:45PM (#36463319)
If I recall this right (it's been a long time, since), initially we marked the column where the carry went by a dot above the minuend. (I guess, it was the same with addition?)