Arithmetic Overflow vs. Arithmetic Carry

后端 未结 2 1800
陌清茗
陌清茗 2021-02-01 04:14

One of my lecture slides gives an example of arithmetic overflow and carry in a topic for conditional branching flags on an ARM chip, quoted below:

  • V (overflow) - 
2条回答
  •  粉色の甜心
    2021-02-01 04:38

    • Overflow flags get set when the register cannot properly represent the result as a signed value (you overflowed into the sign bit).
    • Carry flags are set when the register cannot properly represent the result as an unsigned value (no sign bit required).

提交回复
热议问题