Convert Decimal to Binary
-5
Convert a decimal symbol to a binary
Function DecToBin(ByVal d)
st = ""
Do While d > 0
If d Mod 2 > 0 Then
st = "1" & st
Else
st = "0" & st
End If
d = Int(d / 2)
Loop
DecToBin = st
End Function



KennethCC
me
jamesmcm
Can
Kelmi
ysg
dannymo2
chorny
wallie
Hackdemian
dannyboy
sundaramkumar
mattrmiller
Pio
i_kenneth
ASmith
ctiggerf
sehrgut
bertheymans
SCoon
Function DecToBin(ByVal d)
st = ""
Do While d > 0
If d Mod 2 > 0 Then
st = "1" & st
Else
st = "0" & st
End If
d = Int(d / 2)
Loop
DecToBin = st
End Function
There are currently no comments for this snippet.