- Bit Fields
- Bit Fields are unsigned int members of structures that occupy a specified number of adjacent bits from one to sizeof(int). They may be used as an ordinary int variable in arithmetic and logical operations.
Bit Fields are ordinary members of a structure and have a specific bit width. They are often used in conjunction with unions to provide bit access to a variable without masking operations.
Creating a Bit Field
unsigned int memberName1: bitWidth;
unsigned int memberNamen:bitWidth
bitfield struct may be declared normally or as a typedef