Most people know how to make a broken line using &H5555 and &H2222, but say you want a line that is an oddball and you don't know the code for it. Do you have to use trial and error, not any more.
The last number is figured out in binary, and it goes in loops of 15; here is a chart that will help you
Now add up all the numbers that had a 1 under them 8192+4096+1024+128+64+8+2+1=13515
LINE (100,100)-(200,100),,,13515
Here is a FUNCTION to help you in your programming, so now you can use
a$ = "011010011001011" LINE (100,100)-(200,100),,,Bin2Dec%(a$)
FUNCTION Bin2Dec% (number$) place = 65535 / 2 FOR a% = 1 TO 16 c$ = MID$(number$, a%, 1) IF c$ = "1" THEN num% = num% + place place = place / 2 NEXT Bin2Dec% = num% END FUNCTION