A processor status bit recording arithmetic carry. For unsigned addition of -bit inputs, , where is the stored result. In the ARM architecture family, subtraction instead uses , so a set arithmetic carry means no borrow. This convention must be checked for the target instruction set; it is not a signed-overflow test.
With the ARM architecture family's no-borrow convention, subtract with carry forms . The same adder used for addition can form . If its output is , rearranging proves . Thus complementing the second operand implements both the result and the correctly chained borrow information.[ref]
For -bit operands, an add with carry operation forms , retains its residue modulo , and outputs its arithmetic carry. Adding low limbs first and feeding each arithmetic carry into the next limb implements multiword unsigned addition. With , the identities and combine into .[ref]
Thumb 16-bit instruction set quick reference by Arm. Page 1, Add with carry
Articles by others on the same topic
There are currently no matching articles.