encyclopegia.org

Zero flag

The zero flag is a single bit flag that is a central feature on most conventional CPU architectures (including x86, ARM, PDP-11, 68000, 6502, and numerous others). It is often stored in a dedicated register, typically called status register or flag register, along with other flags. The zero flag is typically abbreviated Z or ZF or similar in most documentation and assembly languages. Along with a carry flag, a sign flag and an overflow flag, the zero flag is used to check the result of an arithmetic operation, including bitwise logical instructions. It is set to 1, or true, if an arithmetic result is zero, and reset otherwise. This includes results which are not stored, as most traditional instruction sets implement the compare instruction as a subtract where the result is discarded. It is also common that processors have a bitwise AND-instruction that does not store the result. The logical formula of the zero flag for a twos-complement binary operand is NOT(OR(all bits of the operand in question)). In most processors, the zero flag is mainly used in conditional branch instructions, which alter control flow on previous instruction results, but there are often other uses as well. In some instruction sets such as the MIPS architecture, a dedicated flag register is not used; jump instructions instead check a register for zero.

The zero flag is a single bit flag that is a central feature on most conventional CPU architectures (including x86, ARM, PDP-11, 68000, 6502, and numerous others). It is often stored in a dedicated register, typically called status register or flag register, along with other flags. The zero flag is typically abbreviated Z or ZF or similar in most documentation and assembly languages. Along with a carry flag, a sign flag and an overflow flag, the zero flag is used to check the result of an arithmetic operation, including bitwise logical instructions. It is set to 1, or true, if an arithmetic result is zero, and reset otherwise. This includes results which are not stored, as most traditional instruction sets implement the compare instruction as a subtract where the result is discarded. It is also common that processors have a bitwise AND-instruction that does not store the result. The logical formula of the zero flag for a twos-complement binary operand is NOT(OR(all bits of the operand in question)). In most processors, the zero flag is mainly used in conditional branch instructions, which alter control flow on previous instruction results, but there are often other uses as well. In some instruction sets such as the MIPS architecture, a dedicated flag register is not used; jump instructions instead check a register for zero. ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Zero flag." encyclopegia.org, 2025, https://encyclopegia.org/wiki/zero-flag. Accessed 24 November 2026.

Chicago

"Zero flag." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/zero-flag.

APA

encyclopegia.org. (2025). Zero flag. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/zero-flag

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Juan de Obregón y Espinosa

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1295786018 · 0.5 · snapshot enwiki-001295786018

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.