wow, this one has a long history. let's see if I can recall the explanation from
my machine language days...
It basically comes down to a number of things, many historical.
In certain situations in Boolean math (also two's complement), the setting or
clearing of all bits would represent an absolute True or False.
Various hardware, processors, etc. have differing native digits of Integer
precision. At the time, it was 4, 8, or 16. Obviously this has changed with
time, and will no doubt continue to change.
Cross platform code works fastest when the values can be manipulated in the
native precision of the processor registers.
There is no standard 1 Bit data type. Especially in VB.
For normal signed integers, the high bit evaluates as the Sign of the integer.
IF you did have a 1 Bit signed integer type, if the value was not 0, it would
be -1 (or -0, but that's a discussion for another day)
If you carry that over to integers of any arbitrary precision, it would make
sense to only need to look at a common register flag. In this case, the Sign
bit. If you needed to convert native integer precision across platforms, this
would require unnecessary casting of values, which would be inefficient.
Besides, casting a non zero 1 Bit integer to any other integer would still
result in -1. Same is the case if you cast a -1 Int32 to an Int64, still = -1.
Note I am talking about Casting, not a Bit-wise compare.
Additionally, by storing the Boolean value as all 1's or all 0's, you get an
additional performance gain when dealing with IO, as you can ignore the Byte
Ordering (Little/Middle/Big Endean). 1111 = 1111 forward or backward.
A Boolean evaluation of an expression is actually a double negative.
If an expression does not evaluate to False(0), then it must be True. So all non
zero values are True.
Basically, given VAR=1 then the statement
"IF VAR THEN"
would really be more like
"IF (VAR <> 0) [returns True {-1}] THEN"
Low level language programmers used to take advantage of this to save a couple
chars in the source when you only had a few KB of space if you were lucky.
Since there is no Bit data type, you can't pass a Bit value as a parameter into
or out of a function, it would still need to be cast to the smallest native data
type supported.
Since VB was designed for 32 bit W/Intel systems, it only makes sense to use the
native data type of the processor for the sake of speed, memory storage, etc. In
this case, that happens to be a 32 Bit Signed Integer. Note that even though
there is a Byte data type, when it is passed to the registers it still goes in
as an Int32.
Sorry if that explanation meandered a little. But hopefully it helps to explain
the "why".
Gerald