Boolean flag

A Boolean flag, truth bit or truth flag in computer science is a Boolean value represented as one or more bits, which encodes a state variable with two possible values.

A single byte can contain up to 8 separate Boolean flags by mapping one Boolean flag to each bit, making it a very economical and dense method of data storage.

[2] Most computer languages support the setting and testing of single or multiple bits in combination for use as truth indicators and usually up to 256 different combinations of conditions can be tested for with just a single instruction on one byte using bitwise operations.

Advancements in processor design and parallel computing mean even more Boolean algebra operations on Boolean flags can be done with just a single instruction using SIMD technology, often implemented in programming languages as compiler intrinsic functions.

This can simplify processing considerably and allows decision tables to be implemented by mapping to their binary representations in memory.