Avoid performing bit manipulation bitwise and arithmetic operations on the same variable. Though data. In particular, it is frequently the case that bitwise operations are performed on arithmetic values as a form of premature optimization. Bitwise operators include the unary operator ~, and the binary operators <<, >>, &, ^, and |. Although such operations are valid and will compile, they can reduce code readability. Declaring a variable as containing a numeric value or a bitmap makes the programmer's intentions clearer and the code more maintainable.
Bitmapped types may be defined to further separate bit collections from numeric types. This may make it easier to verify that bit manipulations bitwise operations are only performed on variables that represent bitmaps.
...
The typedef name uintN_t designates an unsigned integer type with width N. ThereforeConsequently, uint32_t denotes an unsigned integer type with a width of exactly 32 bits. Bitmaps are normally assigned an declared as unsigned type.
Non-Compliant Code Example (left shift)
...