-
I created a program recently to help me practice conversions from Binary to Hex to Octal to Decimal for a class I was taking. ONe of the things that bugged me was that I couldn't find a conversion function for binary....
I mean... that HAS to be in VB somewhere doesnt it? That's how the computer thinks so it has to have a way to translate it.
I ended up having to write a custom function to keep mod dividing the number specified by 2 to figure it out. It was pretty cool though once it was finished and I DID get a decent grade on the test. Still, that's bugged me for a while now.
Does anyone know of a function for that? Or did Overlord Bill Gates forget something in VB?
Eiredrake
-
-
-
Depends on what you want to do!
If you just want to return a string with the 1's and 0' then these are all great. BUT if you want to work with bits then you'll need to practice working with bitwise operators
AND
OR
XOR
NOT
EQV
IMP
They are all explained in the MSDN help.
That's how you should be dealing with bits