Hi. i was wondering if anyone would beable to help me a bit.
in college yesterday we had to make a program to convert decimal numbers in to 8 bit binery. we werent aloud to use any premade functions to do this.
the way i decided to do it was this:
Code:
If number >= 128 Then
number = number - 128
text1 = 1
else
text1 = 0
End If
i had 8 of these statments, each one covering the next part of the binery (64,32,16,8,4,2,1)
it all worked fine and i got the grade. then i tryed to compress the code in to one loop, so i dint have 8 if statments, just one that would jump forward to the next number
unfortunatly i cant get it to work. im not shure what im doing wrong. im not getting any strange errors, the program runs fine. it just wont update the text boxes with the answers proply. i think my problem is that i dont fully understand how loops work yet and ive made a stupid mistake. i was wondering, if anyone would take a look at it and see if they can find what ive done wrong, to help pount me in the right direction?
this is only the 6th program ive made, so theres bound to be loads of problems
thanks for your time!
http://www.tentative-title.com/binery/Form1.frm
http://www.tentative-title.com/binery/Project1.vbp