length - 1; i >= 0; i--) { out += outArray[i].toString(toBase); } return out; } function decToHex(decStr) { var hex = convertBase(decStr, 10, 16); return hex ? '0x' + hex : null; } function hexToDec(hexStr) { if (hexStr.substring(0, 2) === '0x') hexStr = ...
8,10,16];var txts = document.getElementsByName("txt");var any = function (i) {txts[i].onkeyup = function () {var val = this.value;for (var j = 0;
* 1024 = [4, 2, 0, 1] */ // Adds two arrays for the given base (10 or 16), returning the result. // This turns out to be the only "primitive" operation we need. function add(x, y, base) { var z = []; var n = Math.max(x.length, y.length); var carry = 0; var...