binary compare using VB ?? 
Author Message
 binary compare using VB ??

Dear All,

I am (probably like many of you) passing an Integer back from some of my
functions which contains various information using the binary digits... eg.

63 = 1+2+4+8+16+32  which is 111111 in binary...
or  37  =  1+4+32 which is 101001

What I want to do is use binary logic to determine if bit 3 is set..  like :

If MyVariable AND 16 then
    ' do something
End If

So if bit 5 was true, the statement above would be true...

I hope you all understand what I mean, and I hope someone can help !

It is obviously possible to write a function that would work it out, but if
there is a function that using the binary logic it should be far quicker..

Thanks in advance !

Chris



Sun, 16 Mar 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Option Compare (Text|Binary|Database) doesn't work

2. Using IDisposable in VB.NET compared to C#.

3. Comparing 2 tables of records in Access using VB

4. Comparing 2 tables of records in Access using VB

5. Help with Binary data types using VB

6. Problems with binary data using MsComm32.ocx of VB 5.0

7. Binary to ASCII using VB

8. Binary CSS Behaviors Using VB

9. Binary to ASCII using VB

10. Reading and writing binary data using vb

11. distributing VB program using binary patches or something like that

12. Reading a C++ Binary file using VB

 

 
Powered by phpBB® Forum Software