Blogger

Delete comment from: Ken Shirriff's blog

Ken Shirriff said...

JSL: you caught me - I skipped over the details for subtraction. :-) The carry-in to the addition provides the increment needed for two's complement. Specifically, if there is no borrow (carry flag clear), the carry-in is set, providing the +1 needed for two's complement subtraction. If there's a borrow (carry flag set), the carry-in is 0, and the lack of +1 means the result is one lower (i.e. the borrow takes place).

Feb 9, 2017, 8:08:23 PM


Posted to Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor

Google apps
Main menu