- Home
·
- Math/Dates
·
- convert any decimal to its binary equivalent, autosize the binary number, for ex: (5) in base 10 --
convert any decimal to its binary equivalent, autosize the binary number, for ex: (5) in base 10 --
convert any decimal to its binary equivalent, autosize the binary number, for ex: (5) in base 10 ----->(101)in base 2 and not (0101), can
API Declarations
' http://sherif1.netfirms.com/bin.zip
'how to use:
'(1) make a textbox name it "x" to put decimal in.
'(2) make a textbox name it "y" to get binary from.
'(3) command box its name is command1
' by : sherif rofael.
' mailto : [email protected]
' website:
' http://sherif1.netfirms.com
' http://vbsherif.members.easyspace.com (to download the programs)
Rate convert any decimal to its binary equivalent, autosize the binary number, for ex: (5) in base 10 --
(2(2 Vote))
u = Int(Log(d) / Log(2))
End Function
Function Bin(n As Double)
Dim s As String, i As Integer
uu = u(x)
For i = 0 To uu
s = (n Mod 2) & s
t = n / 2
n = Int(t)
Next
Bin = s
End Function
Private Sub Command1_Click()
y = Bin(x)
End Sub
convert any decimal to its binary equivalent, autosize the binary number, for ex: (5) in base 10 -- Comments
No comments yet — be the first to post one!
Post a Comment