No. Even if you have an array of logical variables, I believe that they are set for each byte each.
Of course, you can define your own data types that have less than 256 valid values (for example Boolean), but you cannot force it to occupy less than a byte in memory.
As L. Bushkin noted, there are types such as BitArrayand BitVector32that effectively pack several bits efficiently — you could write your own type NybbleArrayif you want.
source
share