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
The smallest object you can create has a sizeof == 1
. That object will be CHAR_BIT
bits in size, which on almost every platform you'll ever see, will be 8.
So the smallest object you can create is a int8_t
aka char
.
You can do things with bitfields to encode many 1 bit numbers into a larger object, but that's not exactly a solution to your problem.