What is Bit-field?
A mechanism for declaring a member of a C struct as a field of a given number of bits, as in unsigned int x : 3; Because small values can be packed together, bit-fields are used to group flags and settings. Storing a value that does not fit in an unsigned field leaves the remainder modulo 2 to the power of the field width. Whether fields are laid out from the high or the low end of a word, and whether a field may straddle a boundary, may differ between implementations, so masks and shifts are often used instead to describe peripheral registers or communication formats.
Japanese name: ビットフィールド
Bit-field appears in 2 practice questions across 2 topics, including Embedded Systems & Firmware, C Programming Basics.
Field: C Programming Basics