Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!decvax!tektronix!cae780!daniels From: daniels@cae780.TEK.COM (Scott Daniels) Newsgroups: comp.lang.c,net.sources Subject: Re: binary radix (+ some source) Message-ID: <3801@cae780.TEK.COM> Date: Wed, 22-Apr-87 18:08:32 EST Article-I.D.: cae780.3801 Posted: Wed Apr 22 18:08:32 1987 Date-Received: Fri, 24-Apr-87 06:02:42 EST References: <213@pyuxe.UUCP> <710@brl-sem.ARPA> <422@ivax.doc.ic.ac.uk> <2970@pegasus.UUCP> <581@csun.UUCP> <2924@well.UUCP> Reply-To: daniels@cae780.UUCP (Scott Daniels) Organization: Tektronix, Inc., Santa Clara, Ca. Lines: 19 Keywords: octal, hex, binary Xref: mnetor comp.lang.c:1856 net.sources:4357 In article <2924@well.UUCP> physh@well.UUCP (JonPhysh Foreman) writes: >... Format for arbitrary bases: 0f. During an investigation for arbitrary base notations (in SAIL, an ALGOL-holics language), I had proposed: '. , where is the character for radix-1 (a must-be-representable character). A C-like version might be: ..number. Thus .7.xxx is octal, .1.xxx is binary, .F.xxx is hex, .2.xxx is trinary, and .0.xxx is unary (although it is not clear whether 0 is .0.0 or .0.). The advantage of this representation is that it is radix-independent (assuming there is a well-defined mapping of characters to digits); you may unambiguously write a number down whatever the default radix. FROM: Scott Daniels, Tektronix CAE 5302 Betsy Ross Drive, Santa Clara, CA 95054 UUCP: daniels@cae780.UUCP (Scott Daniels) tektronix!teklds!cae780!daniels {ihnp4, decvax!decwrl}!amdcad!cae780!daniels {nsc, hplabs, resonex, qubix, leadsv}!cae780!daniels