NVIDIA Interview Question
Software Engineer / DevelopersData accesible is bit even though it occupies 1 byte.
In bit addressing,
1- bit consume 1 byte
2 - bits consume 1 byte only it continues till 8 bits (assuming 1 byte address boundary) then starting from the 9th bit, 2 bytes are consumed.
Refer to K&R book on C for bit addressing. I have tested these values.
Even in Microprocessors or Microcontrollers, there will be dedicated bit addressable memory. For example 8051 has 16bytes of but addressable memory.
Yes, a boolean uses a byte.
- mg August 09, 2009