VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



use of binary converter

by Ajay Ashok Ghuge (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 4th March 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

use of binary converter

Rate use of binary converter



Dim r As Integer, i As Integer
Dim dec As Integer
Dim b(10) As Integer
a = Text1.Text
sum = 0
i = 0
c = 1
While (a > 0)
    r = a Mod 10
    sum = sum + (r * c)
    a = a \ 10
    c = c * 2
Wend
Text2.Text = sum

dec = sum
While (dec > 0)
b(i) = dec Mod 8
dec = dec \ 8
i = i + 1
Wend

For i = i To 0 Step -1
 Text3.Text = Text3.Text & b(i)
 Next i



Download this snippet    Add to My Saved Code

use of binary converter Comments

No comments have been posted about use of binary converter. Why not be the first to post a comment about use of binary converter.

Post your comment

Subject:
Message:
0/1000 characters