Why is a boolean 1 byte and not 1 bit of size?

Asm picture Asm · Jan 7, 2011 · Viewed 61k times · Source

In C++,

  • Why is a boolean 1 byte and not 1 bit of size?
  • Why aren't there types like a 4-bit or 2-bit integers?

I'm missing out the above things when writing an emulator for a CPU

Answer

Paul Tomblin picture Paul Tomblin · Jan 7, 2011

Because the CPU can't address anything smaller than a byte.