In ARM architecture, what does the Zero (Z) flag indicate after an arithmetic operation?
Think about what it means if the result of a calculation is exactly zero.
The Zero (Z) flag is set when the result of an operation is exactly zero, indicating no value or a zero result.
Which of the following best describes when the Carry (C) flag is set in ARM after an addition?
Carry flag relates to unsigned arithmetic and bits beyond the register size.
The Carry (C) flag is set if an addition produces a carry out of the most significant bit, indicating an unsigned overflow.
After adding two signed 32-bit integers in ARM, the Overflow (V) flag is set. What does this indicate?
Overflow flag relates to signed arithmetic limits, not unsigned.
The Overflow (V) flag is set when the signed result of an operation is too large or too small to fit in the register, indicating signed overflow.
Which statement correctly distinguishes the Negative (N) flag from the Overflow (V) flag in ARM?
Think about what negative means versus what overflow means in signed math.
The Negative (N) flag is set if the result's most significant bit is 1, indicating a negative number in two's complement. The Overflow (V) flag indicates if signed arithmetic overflow happened.
Consider the ARM instruction SUBS R0, R1, R2 where R1=0x00000000 and R2=0x00000001. Which flags will be set after this operation?
Subtracting 1 from 0 causes a negative result in two's complement and affects carry flag differently than addition.
Subtracting 1 from 0 results in 0xFFFFFFFF (negative). N=1 because result is negative, Z=0 because result is not zero, C=0 because borrow occurred (0x00000000 < 0x00000001 unsigned), V=0 because no signed overflow.
