Esentially I want to create a data type uint1_t
. Is that even possible?
I know the size of the bool data type is one byte. But boolean values only need
Contrary to what some people believe, there is a data type of one bit in C99: it's called _Bool
. You can also declare bitfields of size 1. The fact that individual bits are not addressable in C does not mean that one-bit data types cannot exist. That argument is basically comparing apples to oranges.
There isn't, however, a type of which the storage size (sizeof
) is less than one byte.