Flag (computing)
In computer programming, a flag is a Boolean variable, a bit that can be set to either 1 (Set, Raised, True) or 0 (Unset, False). Its typical use is as a status variable, or for configuration.
Specifically, in computer engineering a flag is a bit in a special CPU processor register, which is used to indicate the existence of a condition such as arithmetic overflow, negative or zero result of an arithmetic operation, or a range of other conditions. The CPU flags are usually used as factors for machine language conditional branch instructions, deciding if the jump instruction will happen or if it will be ignored. For example a je (Jump if Equal) instruction in the X86 assembly will be executed if the Z (zero) flag was set by some previous instruction.
It is likely its name came from the small flags on the mailboxes used for delivery of letters and small shipments in rural and suburban areas of the USA, which are customarily raised up by the postman as an indication that a new mail is in.
