Why a One-Bit Value Often Gets a Byte
A Boolean has only two logical states—true and false—but ordinary program memory is usually organized for convenient access in chunks, commonly bytes. A byte-addressed machine can name each byte directly; it generally cannot give every individual bit its own address. So a language or compiler may store a Boolean in a byte-sized slot, using one bit to represent the state while leaving the rest unused.
That slot is also a practical interface between the value and the rest of the program. Loads, stores, and function calls can handle a whole byte using familiar machine instructions and predictable layouts. The exact size is not universal: language rules, compiler choices, and hardware conventions can differ, so a Boolean’s size should not be assumed to be identical everywhere.
When Packing Bits Is Worth the Trouble
If a program has a huge collection of flags—such as whether each item in a large dataset meets a condition—wasting most of each byte can add up. A packed format stores many Booleans in the bits of a byte, reducing the space needed. The program then has to calculate which byte and which bit hold a particular value, and use bitwise operations to read or change it.
Packing can make updates more complicated, too: changing one bit may require reading and rewriting the byte that contains it. That can matter when multiple parts of a program access the same data, or when the format needs simple, predictable individual values. The tradeoff is concrete: ordinary Booleans favor straightforward access; packed Booleans favor compact storage.






