README.md
December 4, 2022 ยท View on GitHub
Description
A function for converting decimal numbers to binary. Very fast.
More Info
Decimal number (Long)
Binary number (string)
| Submitted On | |
| By | K. Mehdi |
| Level | Unknown |
| User Rating | 4.8 (24 globes from 5 users) |
| Compatibility | VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0 |
| Category | Math/ Dates |
| World | Visual Basic |
| Archive File |
Source Code
Private Sub Command1_Click()
DecValue = Val(Text1.Text)
BinValue = ""
Do
TempValue = DecValue Mod 2
BinValue = CStr(TempValue) + BinValue
DecValue = DecValue \ 2
Loop Until DecValue = 0
'Print
'Print BinValue
Text2.Text = BinValue
End Sub