Dim a As Integer, i As Integer, b(20) As Integer, c As Integer, d As Integer
i = 0
a = TextBox1.Text
While a > 1
b(i) = a Mod 2
a = a / 2
i = i + 1
End While
b(i) = a
While i >= 0
c = c & b(i)
i = i - 1
End While
Label5.Text = c
Label5.Visible = True
hey guys i wrote the above prog to convert decimal to binary the result i get is wrong for the last digit..
eg when converting 100 i get 10100100 instead of 1100100
thanks in advance..