Convert Decimal to Binary





-5
Date Submitted Tue. Feb. 28th, 2006 5:20 AM
Revision 1 of 1
Syntax Master dannyboy
Tags ASP | Convert | VBSCRIPT
Comments 0 comments
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 
 

Comments

There are currently no comments for this snippet.

Voting