These operators all you to change the Decimal output base or
the . input base. This is both powerful and trickey.

Last Up date: 2005 November 12

So far, we have considered two number system bases: Decimal and Hex. As has been mentioned earlier all values in IA are kept and manipulated with 16-bit unsigned arithmetic. Hex is fundamental to IA, while decimal is a "convenience" conversion for input and output. For output "decimal" can be any base two through fifteen. When the top value on the stack is not zero .= operator changes the base for all "decimal" output. Furthermore, that base is used for all "decimal" output until it is explicitly changed again or IA is restarted.

When IA encounters .= and the value on the top is 2 through 15 it becomes the new output base. For illustrative purposes consider changing the output base to five. 5.=100= <Enter> will output the value one hundred in base 5 and hex. If on the next line we input: 2,20$ <Enter> we will see the Square Root of 2 in base 5 with twenty digits following the period. If we attempt to set the "decimal" output base to one or zero the value of ten is used; so we can get back to "normal decimal" output by simply entering just a .= or 1.= or 10.= on a line.

It should be pointed out that when the output base is greater than 10 the "digits" output that are greater than 9 are not letters but the ASCII characters that follow 9. Specifically: : ; < = > and ? in that order. (I have "fixed" this to use the letters A-F, but decided it is used so infrequently, and the program had to check for each digit; so I took the "fix" out. If you find this too distracting, I could be persuaded.)


There is no way to change Decimal input! But. . .
by using . (dot input) we have seen how to input values in Hex. Hex is the default, but dot input can be changed to any base from 2 through 255.

To change the dot input base you use .: and the top value on the stack is used to specify the new base. And like with changing decimal output that base is used for all "dot input" until it is explicitly changed again or IA is restarted.

I have written up elsewhere how to use "Decimal Coded Digits", which is needed for larger dot input bases.


Contact me at:
My phone #'s
For comments call, or e-mail me. Go to My Home Page or TOP of this page.