why does VB.NET reserve 2 bytes for the boolean data type?

rami

New member
Joined
Jun 5, 2005
Messages
1
Programming Experience
1-3
Hello!

I would like to know why do most programming languages (including VB.NET) reserve 2 bytes for the boolean data type while only 1byte is sufficient. I was told that this is due to the nature of most existent processors which are 32 bit processors. I was also told that such processors would have to convert a 1-byte data value to a 2-bytes data value to be able to process them.

I would like to get more details on why is that the case. Is it cz the upper halves of the registers are 2 bytes wide, & it would be a waste if we didnt make good use of them? Or is this related to bus width? could it also be related to endianess, or a combination of the previous? if so how?I know this is not a strictly programming answer, but i was hoping that a senior programmer would be able to answer it.Thank you very much in advance.
Regards,

Rami
 
Back
Top