Skip to content
Dimitar Dimitrov edited this page Jul 8, 2023 · 1 revision

Carry bit - random notes

An E2E forum post has details for the somewhat unexpected Carry Bit behaviour. Quotes:

Probably the subtraction is implemented as an addition with second operand negated, and in this case the carry is inverted:

0 - 1 = 0 + (-1) = 0 + FF = FF and carry is 0. (but should be 1) 1 - 1 = 1 + (-1) = 1 + FF = 0 and carry is 1. (but should be 0)

The problem is in the documentation, which let think that the common carry works in normal way for both addition and subtraction.

Clone this wiki locally