[comp.arch] Flash! 16 not power of 2!

wright@stellar.UUCP (David Wright @stellar) (08/05/89)

In article <3050@blake.acs.washington.edu>, mrc@Tomobiki-Cho.CAC.Washington.EDU
(Mark Crispin) writes:

>Back in days long by, people would actually *do work* in a power-of-2-based
>number counting system.  You would not believe how much easier it is to do
>arithmetic in octal instead of hex -- not to mention translating between
>octal and the values displayed in the lights or that you key in the switches!

This is either missing a smiley or is the dumbest thing I have ever read
on comp.arch.  Listen carefully, bucko:  hexadecimal is base 16.  Last
time I looked into the matter, 16 was a power of two, and I have not had
much trouble translating it into binary, if you know what I mean and I
doubt you do.

(*flame off*)

[maybe he thinks hex is decimal??]

I used octal back when I was working on those good ol' Honeywell
mainframes.  Octal is a very sensible radix for a 36-bit processor
that has lots of 18-bit and 6-bit fields, and uses either 6-bit or
9-bit characters.  Unfortunately, I gather that Honeywell (and 
therefore Prime, later) went ahead and used octal on their 16-bit
processors.  This is like putting socks on a rooster.  Octal is
incredibly inconvenient when trying to do something like figure out
what character is in the upper half of a 16-bit quantity.

I know Bill Davidsen is a Honeywell veteran, and I see Alex Colvin
posting every so often [Hi, Alex!  when are you going to escape grad
school?]  Anyone else?  I admit that the Honeywell 600/6000/DPS lines
had some real drawbacks, e.g. single-accumulator, but I liked
programmming them, and the extended instruction set (EIS) was a wild
thing to work in once you got the hang of it.  Being a systems
programmer on the Dartmouth Time-Sharing System was really the life
at times...

Honeywells were basically IBM ripoffs with a special Gray-to-binary
instruction added so they could work on radars on the DEW line.
They had some interesting features; not only did they have an
execute (XEC) instruction that would execute the instruction at the
effective address, they had execute double (XED) that would execute
the two instructions starting at the effective address.  Since the
second of the pair could also be an XED, you could set up a chain
of these things.  Such chains were not interruptable, but this was
handled by starting a timer when the processor entered an inhibited
state (you could also do this by setting bit 28 in each instruction)
and if the timer expired, the processor faulted.  Such a fault could
occur in the middle of an instruction, making the process non-
restartable.

The other feature I've not seen elsewhere was the repeat instruction.
This had the effect of repeatedly executing the instruction following
the repeat (RPT), or the two instructions following (RPD) up to 256
times.  You could specify condition code settings that would end
the iteration before the count ran out.  There was even repeat-link,
which would follow a linked list.  They were very fast when it was
all done in hardware, but now the machines are microcoded and it's
faster (as I hear it) to get rid of the RPT and do the iteration
yourself.  Sigh.  All that tuning for nothing.

    -- David Wright, Stellar Computer, Inc
       wright@stellar.stellar.com

  "Whatever it is, just tell them 'no'.  I'll fix it." 
     'The Man Who Sold the Moon', Robert A. Heinlein

werme@Alliant.COM (Ric Werme) (08/07/89)

In article <38139@stellar.UUCP> wright@sol.UUCP () writes:
>In article <3050@blake.acs.washington.edu>, mrc@Tomobiki-Cho.CAC.Washington.EDU
>(Mark Crispin) writes:
>
>>Back in days long by, people would actually *do work* in a power-of-2-based
>>number counting system.  You would not believe how much easier it is to do
>>arithmetic in octal instead of hex -- not to mention translating between
>>octal and the values displayed in the lights or that you key in the switches!
>
>This is either missing a smiley or is the dumbest thing I have ever read
>on comp.arch.  Listen carefully, bucko:  hexadecimal is base 16.  Last
>time I looked into the matter, 16 was a power of two, and I have not had
>much trouble translating it into binary, if you know what I mean and I
>doubt you do.
>
>(*flame off*)

No, he's right, and you're missing the point.  By the time I left PDP-10s and
-11s, I had learned the octal addition table and most of the multiplication
table.  (I rarely had to multiply octal numbers, otherwise I would have learned
that too.)  When you have to use the console panel to debug a broken system
(or broken debugger...) it's very handy to be able to figure out where to
look if you know a control block is at 46342 and you need to look at the
word 42 words into it (i.e. look at 46404).  I've been working on hex machines
sine 1978 and I still can't figure out 48a9c+44 without including something
like 9+4 = 13(base 10) = b(base16).  The problem is that the hexadecimal
addition table is 4 times bigger than octal's.  Even worse when you consider
that half the octal table is filled with the easy +0, +1, and +7 rows and
columns.

Sigh.  That was another nice thing about the first PDP-10.  The console
switches were contoured nicely to make binary addition easy.  I would set the
address switches to the start of the control block and add in the offset
like a binary abacus.  Those PDP-11 switches with their sharp edges - ugh.

:-) on
Listen carefully, bucko: I'm pleased that you can convert hex to binary and
back again.  But I'm not impressed.  If you can multiply 3 digit hex numbers
in you head, then I'll be impressed.  Me?  I gave up and bought a HP16.
:-) half off
BTW, haven't you learned not to followup to us comp.archaic folks?  It just
prods us into still more reminiscing about the good ol' days.
:-) off
-- 

| A pride of lions              | Eric J Werme                |
| A gaggle of geese             | uucp: decvax!linus!alliant  |
| An odd lot of programmers     | Phone: 603-673-3993         |

mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) (08/08/89)

In article <38139@stellar.UUCP> wright@sol.UUCP () writes:
>In article <3050@blake.acs.washington.edu>, mrc@Tomobiki-Cho.CAC.Washington.EDU
>(Mark Crispin) writes:
>>Back in days long by, people would actually *do work* in a power-of-2-based
>>number counting system.  You would not believe how much easier it is to do
>>arithmetic in octal instead of hex -- not to mention translating between
>>octal and the values displayed in the lights or that you key in the switches!
>
>This is either missing a smiley or is the dumbest thing I have ever read
>on comp.arch.  Listen carefully, bucko:  hexadecimal is base 16.  Last
>time I looked into the matter, 16 was a power of two, and I have not had
>much trouble translating it into binary, if you know what I mean and I
>doubt you do.
>
>(*flame off*)
>
>[maybe he thinks hex is decimal??]

Yay-ah, buckie boy, ah know what ol' hex is.  Ahm jest a young'un in
computing 'cuz ah've only done it fer 18 years...

You seem to think I'm talking about easy for a computer to do arithmetic.
I could care less how easy it is for a computer; that's why we have
computers.  I care about how easy it is for a human

It is easy for humans to do arithmetic in decimal because we've been
trained to do so since a young age.  It is relatively easy for us to do
arithmetic in octal since you can use your childhood-learned arithmetic
tables plus a rule to drop 8's and 9's (= offset by 2) in addition and
subtraction.

It is much more difficult to do arithmetic in hex.  You have to remember
glyphs that are not used in the human (decimal) counting system (A through
F), their bit patterns, and their arithmetic rules.  I can probably tell
you that the bit pattern 111010011110111001100010110000001101 is
723671426015 octal much faster than you can tell me it is E9EE62C0D hex.

Fortunately, along with the creeping imposition of hexadecimal on all
modern computers have come tools such that it's virtually never
necessary to do any *human work* in hex.  There was fun in keying in
through the switches and reading the lights (I will always remember the
PDP-8 RIM loader and the PDP-10 "20 loader").  But that's ancient history
now.

Mark Crispin / 6158 Lariat Loop NE / Bainbridge Island, WA 98110-2020
mrc@CAC.Washington.EDU / MRC@WSMR-SIMTEL20.Army.Mil / (206) 842-2385
Atheist & Proud / 450cc Rebel pilot -- a step up from 250cc's!!!
tabesaserarenakerebanaranakattarashii...kisha no kisha ga kisha de kisha-shita
sumomo mo momo, momo mo momo, momo ni mo iroiro aru
uraniwa ni wa niwa, niwa ni wa niwa niwatori ga iru