| Information | |
|---|---|
| has gloss | eng: A truth bit or truth flag in computer science is an indicator that needs to be only one bit long (within any byte) whose value is either 1 or 0 - representing TRUE or FALSE. Sometimes a whole byte or longer character variable is used for this purpose and may contain values such as * Y or N, or * YES or NO or * TRUE or FALSE as an alternative to binary 0 or 1. Memory usage A single byte can contain up to 8 separate truth bits, making it a very economical method of storage in comparison with other methods. Efficiency 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. Usage Sometimes, programs are written to simply set flags when certain conditions are detected, rather than have multiple nested conditional statements (eg IF's) that can get quite complex. |
| lexicalization | eng: truth bit |
| instance of | c/Conditional constructs |
Lexvo © 2008-2026 Gerard de Melo. Contact Legal Information / Imprint