Re: OT: Need help with numeric bases
From: | Peter Clark <peter-clark@...> |
Date: | Monday, February 24, 2003, 23:40 |
On Monday 24 February 2003 05:01 pm, H. S. Teoh wrote:
> Obviously, if the result of the decrement is less than 0, the next digit
> after it will be decremented ("borrowed" from), as is shown above. If it
> becomes 0, then the process is repeated: substitute 8 and decrement next
> digit, etc.. (Oh BTW Peter, I made a mistake in the private reply, where I
> said a sequence of 0's turns into 8's -- only the first digit becomes 8,
> the rest becomes 7's.)
Hmm...this is going to be an interesting mini-challenge to whip up a script
that will convert between ash[*] and decimal. I would need to keep track of
whether a zero has already occured or not, as well as some system by which a
preceeding digit can be decremented to either 8 or 7.
Thanks,
:Peter
[*] "ash" is Enamyn for "eight," and it is pronounced /aS/, not /&S/. I
thought it would be less confusing than calling it an octal system, since
"octal" usually implies 0-7, rather than 1-8.
--
Oh what a tangled web they weave who try a new word to conceive!
Reply