|
-
Dec 30th, 2000, 08:00 AM
#1
why in boolean we use 16 bits not 8 bit????????
-
Dec 30th, 2000, 08:14 AM
#2
Yes why isn't it just one bit?
The simple answer is because Microsoft designed it that way.
Before VB4 there was no Boolean data type but the values True and False existed.
True is in VB -1 and False is 0.
Since a VB Integer is still 16 bit and not 32 a value of -1 in binary would be 1111111111111111 and 0 would be 0000000000000000.
When Microsoft introduced the Boolean data type in VB4 they could not change the values of True and False without breaking the backward compatability with older programs.
That's why a Boolean must be of the same length as an Integer.
-
Dec 30th, 2000, 08:27 AM
#3
Lively Member
Very enlightening
Shouldn't the question then be
why in boolean we use 16 bits not 1 bit????????
instead of
why in boolean we use 16 bits not 8 bit????????
 penyou! 
"The code bytes.."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|