does anyone have a function to convert decimal to binary?
Last edited by high6; Feb 5th, 2006 at 08:10 PM.
The .NET Framework does: VB Code: Dim myBinaryString As String = Convert.ToString(myNumber, 2) You can also specify 8 or 16 to convert to octal or hexadecimal. To convert a binary string to a number you would use: VB Code: Dim myNumber As Integer = Convert.ToInt32(myBinaryString, 2)
Dim myBinaryString As String = Convert.ToString(myNumber, 2)
Dim myNumber As Integer = Convert.ToInt32(myBinaryString, 2)
Why is my data not saved to my database? | MSDN Data Walkthroughs VBForums Database Development FAQ My CodeBank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) Beginner Tutorials: VB | C# | SQL
Originally Posted by jmcilhinney The .NET Framework does: VB Code: Dim myBinaryString As String = Convert.ToString(myNumber, 2) You can also specify 8 or 16 to convert to octal or hexadecimal. To convert a binary string to a number you would use: VB Code: Dim myNumber As Integer = Convert.ToInt32(myBinaryString, 2) thanks
Forum Rules