Mehyar Posted November 18, 2003 Posted November 18, 2003 Today is a sad day because I am a little bit disappointed about VB.NET . I always thought that boolean variables are bits but now I discovered that they are 2 bytes (16 bits) !!!! What do u need more than a 1 and a 0 for a boolean. Please enlighten me.. Quote Dream as if you'll live forever, live as if you'll die today
Administrators PlausiblyDamp Posted November 18, 2003 Administrators Posted November 18, 2003 http://www.xtremedotnettalk.com/showthread.php?s=&threadid=78815&highlight=boolean+bits Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Nightyhawk Posted November 19, 2003 Posted November 19, 2003 Today is a sad day because I am a little bit disappointed about VB.NET . I always thought that boolean variables are bits but now I discovered that they are 2 bytes (16 bits) !!!! What do u need more than a 1 and a 0 for a boolean. Please enlighten me.. Faster chips and processors are the source of it. We're emerging with technology to 64-bit processors. FYI, You can still declare a short integer in VB.Net. Quote Take care, Lori :D --DreamWEBCatcher.com
*Experts* Volte Posted November 19, 2003 *Experts* Posted November 19, 2003 If you want to store many boolean values (1 and 0) in one variable, you can look at storing flags as bits inside an Integer. In one Integer you can store 32 on/off values by using bitwise operators to set each of the 32 bits individually. There's not really much of an advantage over using an array of Booleans though, other than its easier to store. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.