> Van: Paul B. Webster VK2BZC > Aan: PICLIST@MITVMA.MIT.EDU > Onderwerp: Re: Inverting binary word > Datum: woensdag 5 mei 1999 15:10 Hello Paul, > Caisson wrote: > > > Using a pre/postfix that designates the Number-base has my vote. > > Using the same Number-base thru-out the whole program (except where > > another representation is called for, like using binary numbers with > > bit-manipulations) > > Hmmm. You've contradicted yourself immediately! Not really. I just tried to say that You/I/Anyone should not take another number-base with every instruction, but not make "take one numberbase thruout the program" a Law. > My personal preference is in fact to use number bases according to > their strengths. For a calculation which I would perform in decimal > (e.g., on a calculator), I use decimal specification of the numbers. I > might tend to use binary for bitmasks, but it isn't really terribly > readable, so I generally use hex. This appears to be what you are > saying you *actually* do. > > > gets another vote. Not depending on the RADIX setup gets a strong > > Thumbs-Up. > > As I don't really think in hex by default, decimal seems a good > default radix. I'm mostly working in Hex. A Subroutine (based on my HEX Radix.) would not work with your program (based on a Dec Radix) ... > > So, the 0xFF gets my vote (notice the lower-case "x" and uppercased > > Hex-digits :-) . > > That is the style I generally use for hex. Only because so many > people appear addicted to this Intel crap notation. Motorola convention > ($ for hex, % for binary) is *immesurably* cleaner, including parsing. That's an opinion. I've worked with both (and with versions that post-fix the number-base), and do not have a real preference ... Although I would like a standard convention :-) > The point I was *actually* making, is that using the "-1" convention, > you can ignore the radix! -1 = -0x1 = b'-1' you see. It's a good one. But writing the number including it's number-base has my preference. > Also note: I never mentioned octal ;-) My god ! I learned to enter machine-code (8080) this way. Geez, I'm getting Old. Greetz, Rudy Wieser