C FAQ's
C FAQ's
A bit field is a commonly used data structure used to compactly hold a set of Boolean flags. Instead of using Boolean variables for each flag, the flags are stored in a fixed-size data structure like an integer, whose size in bits is known. The Boolean flags are then stored in each bit of the data structure, minimizing memory usage. In order to retrieve, read and write information from and to a bit field, the programmer uses the bitwise operators AND, OR and NOT.