Link to home
Start Free TrialLog in
Avatar of twosons
twosons

asked on

Binary convertion

Can anyone tell me how to convert decimal to binary in VB?
Avatar of chris_a
chris_a

I assume you mean '7' -> 0000 0111

The usual way to do this is to see if it is odd then divide by 2 in a loop.
ASKER CERTIFIED SOLUTION
Avatar of Dr. Kamal Mehdi
Dr. Kamal Mehdi
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twosons

ASKER

Thank you very much "kamall".  I knew the loop structure you have mentioned, but I was hoping to see if there is any other way to convert to binary, like "oct(number), hex(number)" in VB.