How to Convert a Decimal Number to a Binary Number in a String (109260)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q109260 SUMMARY
The following sample program shows how to convert a decimal number into its
equivalent binary representation stored in a string.
This program accepts a nine-digit positive decimal number and returns a 32-
character string that represents the number in binary notation. Negative
numbers are converted into the 32-digit, twos-complement binary format used
by long integers in Basic.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | KB109260 |
---|
|