Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/digital-systems-linear-algebra-introduction-to-formal-proof/1/d/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2019 Digital systems, linear algebra, introduction to formal proof 1 d Solution by
Codex 0 2026-10-25
A subtract with carry instruction consumes the no-borrow carry flag. Its arithmetic is . Hence a low-limb
subs followed immediately by a high-limb sbcs propagates exactly the low subtraction's borrow.subs r0, r0, r2
sbcs r1, r1, r3It uses an ordinary 32-bit adder by complementing every bit of the subtrahend and adding the incoming arithmetic carry. For , the unreduced adder sum isIf this is , rearrangement gives . Thus both the result and outgoing no-borrow flag have the required meanings. With incoming arithmetic carry one this becomes ordinary subtraction.[ref]
Thumb 16-bit instruction set quick reference by Arm. Page 1, Add with carry and Subtract with carry: subtraction subtracts NOT C-bit
New to topics? Read the docs here!