convert a decimal value to binary
Hi,
How can I convert a decimal value to binary and then assign each bit of the word to it's own image that will represent a hi/low state? The images on the form will change their background color which will lighten or darken depending on their hi/low state.
Ken
[438 byte] By [
kennm] at [2007-12-29]
Lets start with one issue at a time...
To convert a number to its binary representation you can use the convert class..
Dim L As Long = 11Dim x As String = Convert.ToString(L, 2)Debug.Print(x) '1011However to convert a Decimal number you will have to create your own algorithm
"To convert a number to its binary representation you can use the convert class.."
Dman,
Thank you for maintaining distinctions that are important for computer scientists to communicate with each each. I think the people who are in a position to teach have an obligation to do that.
I appreciate it that you say "code" instead of scripts. I appreciate it that you recognize and maintain needed distinctions.