[decbin] i = 1 r = 0 binval = 0 nr = decval Do r = nr % 2 nr = int(nr/2) binval = binval + r*i i = i*10 Loop while nr > 0 wait
2. Test Program:
decval = 0 binval = 0 wprint "<br><br>Decimal value " textbox decval button " Convert ", [decbin] wprint "<br><br> Binary value " textbox binval wprint "<br><br>" button " Exit ", [TestExit] Wait [TestExit] end
Looking forward to see your own ideas about!
Happy breadboarding,
TJ.