[Coco] Converting Dec to Binary

Allen Huffman alsplace at pobox.com
Wed Mar 21 12:40:05 EDT 2018


On Mar 21, 2018, at 9:41 AM, phil pt <ptaylor2446 at gmail.com> wrote:
> 
> Has anyone seen a program already developed that converts dec to Binary?

Remove spaces to make it run a tad faster...

5 INPUT”DECIMAL NUMBER”;A
10 FOR Z=7 TO 0 STEP-1:IF (2^Z AND A) THEN PRINT”1”; ELSE PRINT”0”;
15 NEXT:PRINT




More information about the Coco mailing list