The usage of DOUBLES is quite simple. 1) load up each of the symbols of a base you wish to standardize in the ⭐KEYS list. 2) Use either of the custom blocks with a ⭐ to convert between bases. - The ⚡ custom block(s) indicate that the process is running without screen refresh, so please use the version best suited towards your needs. 3) The resulting output will be in the (global) variable named ⭐OUT.
Division-Operated Universal Basing Lossless Experimental Script, by ARX. DOUBLES is a Base Converter which operates using division rather than multiplication. It concatenates digits incrementally until they are divisible by the new base and reiterates through each phase of base conversion until all division operations are completed and only remainders remain. Because of this, DOUBLES is generally lossless and can calculate past 18 digits, which normally cannot be done due to a loss of resolution when doing standard math operations in Scratch. By default, DOUBLES can convert between bases 2 - 38; it is not coded with edge cases in mind, so do proceed with caution when using this script. The current key values are as follows: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-_ Originally, I had attempted multiple times to develop a system to convert from a base (2-16) to base 10 (decimal) and another system to reverse the process. All attempts were ultimately unsuccessful, as upon revisiting and trying the project I'd get faulty values due to mistranslations in the mathematical processes of base conversion. DOUBLES has been tested more rigorously, and offers a much more stable engine which uses less blocks of code and offers decent performance. As a result, I would consider DOUBLES to be a functional successor of my prior iterations and a compact combination of the two. Some minor improvements which may be possible include: 1) the avoidance of index-searching for values in a table via a for loop iterating through a variable with the key. 2) A simplified division process which does not check a flag each time a division is inoperable, resulting in a "0" being added to the chain. 3) Less use of recursion in the system. Extensive testing should be done to confirm whether or not a substantial performance increase exists for the above suggestions, as they are all speculations.