--- title: "Number Base Converter" id: 76541 type: "computer_media" slug: "number-base-converter" url: "http://localhost/computer_media/number-base-converter/" markdown_url: "http://localhost/computer_media/number-base-converter.md" published_at: "2026-11-11T08:02:28+00:00" modified_at: "2026-11-11T08:02:28+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/number-base-converter-1.png" excerpt: "Convert whole numbers between base 10 and any base from 2 to 36 on the ZX80, using letters for digits above 9." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Don Richardson" slug: "don-richardson" taxonomy: "indiv" url: "http://localhost/indiv/don-richardson/" genre: - name: "Mathematics" slug: "mathematics" taxonomy: "genre" url: "http://localhost/type/mathematics/" media_type: "Program" programmers: - name: "Don Richardson" slug: "don-richardson" taxonomy: "indiv" url: "http://localhost/indiv/don-richardson/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Number%20Base%20Converter%20%281981%29%28Richardson%2C%20Don%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1981" images: - url: "http://localhost/wp-content/uploads/2026/11/number-base-converter-1.png" - url: "http://localhost/wp-content/uploads/2026/11/number-base-converter-2.png" article_media: - id: 19768 title: "Computer Number Systems III" type: "article" url: "http://localhost/article/computer-number-systems-iii/" media_type_tags: "Mathematics" license: false --- # Number Base Converter A base converter from the Syntax series on number systems. Enter 10 to convert from decimal to another base, or enter the base you are converting from. The program then asks for the number and prints the result, using the letters A to Z as digits above 9, so any base up to 36 works. Negative numbers are allowed, and a digit that is too large for the base is reported as a non-legal number. Answer Y to do another conversion. Don’t ask for base 1: the program would loop forever. Published in Syntax April 1981 ([Computer Number Systems III](https://timexsinclair.com/article/computer-number-systems-iii/)). ## Source Code ``` 10 CLS 20 PRINT "WHAT BASE? (ENTER 10 IF YOU WANT" 30 PRINT "TO GO FROM BASE 10 TO ANOTHER" 40 PRINT "BASE, OR ELSE ENTER THE BASE" 50 PRINT "TO CONVERT FROM)" 60 INPUT B 70 CLS 80 IF B=10 THEN GO TO 230 90 PRINT "WHAT IS THE NUMBER?" 100 INPUT A$ 110 CLS 120 PRINT A$;" BASE ";B;"="; 125 LET PN=1+2*(CODE(A$)=220) 127 IF CODE(A$)=220 THEN LET A$=TL$(A$) 130 LET X=0 140 LET Y=CODE(A$)-28 150 IF Y