armviz

NZCV

32-bitFlags

The four condition flags, packed into the top four bits of PSTATE. Most data-processing instructions write these as a side effect, and every conditional instruction reads them to decide whether to execute. Reachable directly through MRS and MSR, which is how software saves and restores flags.

Field layout

31
30
29
28
—
byte 3
byte 2
byte 1
byte 0

Current value hover a field to locate it

B3
B2
B1
B0

Fields

BitsFieldBitsValueDescription
31N[31]10x0

Negative. Set when the result of the last flag-setting instruction was negative in two's complement, that is, when bit 63 (or bit 31 for a 32-bit operation) came out as 1.

30Z[30]10x0

Zero. Set when the result of the last flag-setting instruction was zero. On AArch64 there is no separate equality flag, so an unsigned comparison is the only kind that sets Z.

29C[29]10x0

Carry. For addition, set when the sum carried out of bit 63 (bit 31 for 32-bit). For subtraction, the inverse sense applies: C is set when there was no borrow. For a shift, it holds the last bit shifted out.

28V[28]10x0

Overflow. Set when a signed result cannot be represented in the destination width, that is, when the operands had the same sign and the result's sign differs from theirs.

27:0—28Not assigned to a documented field. Values written here are reserved and should be treated as read-as-zero unless the architecture says otherwise.