Sunday, August 27, 2017

A Brief History of Computers

Trust me!  This is not going to be another one of those "and then so and so invented the such and such" kind of historical pieces.  But that won't stop me from starting by mentioning a name.

Paul Allen is the other founder of Microsoft.  He doesn't get as much ink as Bill Gates but that doesn't stop him from being interesting in his own right.  Allen suffers from serious long term health issues.  They are the kind of issues that led him to conclude he was not destined to live a long and healthy life.  So after Microsoft got established and Allen found himself fabulously wealthy he decided he better start playing while he still had the time.

So he played.  Most obviously, back in 1988 he bought the Portland Trailblazers NBA basketball team.  He has an NBA regulation basketball court "out back" of his house in case his players want to shoot a few hoops when they stop by to visit.  And apparently one big time professional team was not enough so he purchased the Seattle Seahawks NFL football team in 1996.  He made an unsuccessful  run at the 31st America's Cup sailboat race in 2003.  But his investment in fun is not limited to big money competitive sports.

He built the ugliest building in Seattle.  It was designed to his specifications by the renowned architect Frank Gehry and reputedly cost $250 million to build.  The original name was the Experience Music Project and it was going to be a tribute to Jimi Hendrix, the seminal rock and roll guitarist.  But disputes with Hendrix's family scuttled that idea.  It has since morphed into something called the Museum of Pop Culture, or MoPOP for short.

If I detailed a complete list of all of Allen's interesting and varied endeavors I would never get to the point of this post.  So I am going to mention only one.  It is a smaller and even less well known museum than MoPOP.  It is the Living Computer Museum.  I'm a computer guy and I confess to having been unfamiliar with its existence until recently.  But when I was finally made aware of its existence I had to check it out so I did.  And that visit is the motivation behind this post.

I started this blog in October of 2010.  One of the first posts I published was called "Computers I have Known".  Here's the link:  http://sigma5.blogspot.com/2010/10/computers-i-have-known.html.  In it I mention several computers.  A close family relative to almost all of them can be found in the "Mainframe" section of The Living Computer Museum.  (BTW, it is called "living" because much of the computer equipment on display is in working condition and patrons can play with it.)  Here's the list (and here's where I start listing off such and such kind of computer in violation of my promise above, but it's a short violation).

The first computer I mention is the IBM 7094.  The Museum doesn't have one but it is looking for one.  The Museum was also a bust on the second machine I discussed, the Burroughs B5500.  They are looking for one of those too.  But the third computer I discussed is the CDC 6400.  They have one of it's siblings, a 6500.  The fourth computer I talked about was the XDS (Xerox Data Systems, but before that the SDS - Scientific Data Systems) Sigma 5.  Again the Museum has a sibling, a Sigma 9.  I then moved on to the IBM 360/40.  The Museum has a sibling here too, namely a 360/30.

Finally I talk about a non-Mainframe computer, the IBM PC.  Here the Museum has a number of PCs as well as non-IBM clones made at around the same time the PC came out in 1981.  The Museum also has an interesting collection of minicomputers (I'm into going to go into what a "minicomputer" is) and a great selection of pre- and post- IBM PC home computers.  And, in the case of pre-, they have various makes and models on display stretching all the way back to the Apple-I and even before.  I strongly recommend a visit if you have any interest in computers and find yourself in Seattle.

So that's the preamble.  Now on to the main subject.  I promised you brief (or at least as close to brief as I can come) so here's the outline.  I am going to divide the history of computers into three periods:  the pre-computer period, the computer period, and the post-computer period.  That last part may seem weird but stick with me.  I promise it will make sense by the time I am done.

A case can be made for starting the history of pre-computers by going all the way back to the abacus.  After all it is a mechanical device for assisting in performing addition and subtraction.  And the digit-by-digit, carry-borrow techniques used with an abacus model how addition and subtraction are done by hand.  They also model how it is done by computers.

A similar case can be made for the slide rule.  This is a device people are no longer familiar with so let me give you the flavor of how it works.  The basic trick is to use a mathematical process called logarithms to convert multiplication and division problems into problems involving only addition and subtraction.  I'm not going to go into the details but scales on a slide rule translate numbers into distances.  By properly positioning the "slide" distances can be added or subtracted in such a way that the answer to a multiplication or division problem can be read off a scale.

Both the abacus and the slide rule are generally thought of by most people as being "not a computer" devices.  The first devices that were obviously computers to our modern eye were two machines made by Charles Babbage called the Difference Engine and the Analytical Engine.  But these devices had absolutely no influence on the development of the modern computer.  That's because Babbage never got either of them to work so they were generally forgotten about shortly after his death.  Their existence and principles were only rediscovered when modern historians started rooting around when computers became a thing.

So let's move on to things that are at least computer adjacent.  And let's start with something simple:  what's a "computer"?  The answer has always been simple but it has changed drastically over time.  There have always been problems that required massive amounts of computation to handle.  Typical examples are determining the airflow across a wing and determining if a bridge is strong enough.  So there has long been an interest in some way to perform massive amounts of computation quickly, accurately, and cheaply.  But for most of history there hasn't been much of a solution.  Various people at various times have become famous for performing prodigious amounts of computation.  I'm not going to bore you with their names but trust me, they were few and far between.

But by the 1930's mechanical devices could be bought that cost roughly a thousand dollars (then a lot of money but not an immense amount of money), that fit on a desktop (they were roughly the size of the eponymous breadbox), and were capable of adding, subtracting, multiplying, and dividing.  This caused technology companies to set up "computer rooms".  These consisted of rows of desks, each equipped with one of these machines and each staffed by a person called a "computer".

These computers (actually people) would be given sheets of numbers and would perform "chains" of calculations.   "For each row add the number in column 1 to the number in column 2 and put the result in column 3.  Then multiply the number in column 3 by the number in column 4 and put the result in column 5.  Finally, add up all the numbers in column 5 and put the result in the box in the bottom right corner of the page".  That sort of thing.  So at this time a "computer" was "a person, usually a woman, who performed large quantities of chain computations".  Now that we have figured out what a "computer" is during this period we can return to the subject at hand.

Then World War II came along.  Various problems, most prominently the need to create "ballistics tables" for field artillery, made the need for large quantities of chained computations acute.  There was just too much "chain calculation" work that needed to be completed.  And all of it needed to be completed by yesterday, if not sooner.  The War was on and people were desperate for anything that looked like it could speed things up.

A number of devices were created just prior to the War or during the early days of the war.  Two of note were the Harvard Mark I and the Colossus machines used at Bletchley Park for code breaking.  I can't find much technical information about either.  But as far as I can tell the Mark I was a super duper adding machine.  And the Colossus machines (roughly a dozen were built) were custom devices used to assist in code breaking.  And as far as I can tell neither these nor other devices mentioned by others had a significant influence on the design of what we now call a "computer".  As far as I can tell neither was capable of high volume chained calculation and that's what people were looking for.

By most telling's, including my telling in the post I referred to above, the first computer was the ENIAC.  I have changed my mind.  I am going to instead characterize the ENIAC as the last pre-computer.  Here's why.  What we now think of a "computer" is what is more formally called a "stored program computer".  You programmed the ENIAC by physically plugging various "functional unit" components together using "patch" cables.  This connected up the various functional units in the proper way to perform the specific chain calculation you wanted to make.  Once everything was set up you could feed large batches of chained calculations into it as long as you only wanted to do one particular chain of calculation.  If you wanted to execute a different series of chain calculations you broke all of the functional units apart and used "patch" cables to hook then together differently.

In spite of being the last pre-computer, the ENIAC is still fantastically important because all designs for what we now think of as computers are based on the ENIAC if you go back far enough.  With the advent of stored program computers the chain of computations could be changed by simply loading a different "program" into the computer, a matter of at most a few minutes.  It took hours to rewire the ENIAC to change the how the chain of computations was interconnected.  Implementing the "stored program" capability required including two additional functional units to the ones ENIAC had.

The first additional functional unit was bulk memory.  ENIAC could, by various trickery, be given access to a couple of numbers to be plugged into the calculation chain at a specific point.  And the output of one functional unit could be shunted to another functional unit, the practical equivalent of a tiny amount of memory.  But ENIAC couldn't keep say 100 or 1,000 numbers handy.  So various schemes were devised to provide a place where numbers could be stored then later retrieved.  Early versions were very limited both but better than nothing.  One early scheme was the "Mercury delay line".  It consisted literally of a small hose filled with Mercury.

A speaker would beep into one end.  The beep would take a fixed amount of time to travel down the hose to the other end where a microphone was positioned.  A not very large (by modern standards) set of numbers could be saved and later retrieved by having them travel around in a loop.  This and other early schemes were all eventually supplanted by "Ferrite core" (often shorthanded as "core") memory.

A large number of tiny donut shaped pieces of magnetic material were employed.  Each donut was constructed so that it could be flipped between "North" and "South".  Clever logic allowed each donut to be independently flipped say to "North" to represent a binary "0", or say to "South" to represent a binary "1".  This was a big improvement over previous technologies but it was eventually replaced, for good reason, by memory based in integrated circuits, what we now call RAM.

So in the early days various schemes for implementing some amount of memory were used with more or less success.  So there was now a place to put the "program".  The second necessary component was a functional unit that could take a small chunk of memory, often referred to as a "word", decode it, and use it to on the fly set up the proper connections between the other functional units.  The addition of these two additional functional units, a memory unit, and an "instruction decode" unit resulted in the first "computer" in the modern sense of the word, "a machine that can perform large amounts of chain computations".

And the first people to do this, to build a computer that included memory and an instruction decode unit, were the British.  In 1948 they got something called the "Manchester SSEM" machine up and running.  So the computer age actually starts with this machine.  It was quickly followed by many other machines.  I want to single out only one other machine from this period, the EDVAC.  It was a fully functional stored program computer.  Why it is important is that the machine was developed in close collaboration with Eckert and Mauchly, the people behind ENIAC and the detailed design of EDVAC was made freely available to the public.  So all subsequent computers, if you follow things back far enough, trace their designs back to the EDVAC.  And the EDVAC traces its design back to the ENIAC.

Things moved at a fast and furious pace from here.  But from here on changes are primarily evolutionary rather than revolutionary.  The change from vacuum tubes to solid state (originally transistors, later integrated circuits) was big in terms of better performance but it too was an evolutionary change.  In fact the IBM 7094 I mentioned above was just a "plus" version of the 7090.  And the 7090 was literally a plug compatible transistorized version of the IBM 709, a vacuum tube machine.

There is only one change that came out of this period that I think is worth mentioning.  And that is the move to the use of microcode.

In the computer business the actual physical device is shorthanded as "hardware" and the programs we run on the hardware are shorthanded as "software".  In the early days when these terms first came into common usage they made a lot of sense.  As I pointed out with the ENIAC you had to literally rewire the functional units together a different way in order to change the specifics of the chain of computations you wanted to perform, the program, if you will.  ENIAC was a big improvement in that at least you didn't have to design and build new functional units but still.  And with the advent of stored program computers the program became even easier to change.  So it made sense to refer to the physical part as hardware because it was hard to change.  And it made sense to refer to the programs as software because they were soft, i.e. easy to change.

But that was then.  And this seemingly sensible concept that hardware is hard to change and software was easy to change has turned out to be not so sensible at all.  In a real sense the opposite is now true and has been for a long time.

Computer programmers depend on the fact that a given type of computer behaves in a certain precisely defined way.  Many details of a program are critically dependent on this being true.  And as computers got faster, cheaper, and more ubiquitous, a whole lot of computer programs got written.  It soon became common for many programs to be written for each computer.  If you wanted to change some of the details of how that computer worked changing any one program to work under the new rules was relatively quick, easy, and inexpensive.

But it was very hard to change them all and all at the same time.  So as the number of programs written for a specific machine got larger and larger it soon imposed a very rigid discipline.  The hardware had to keep behaving in exactly the way.  So in effect the software got hard.  It became harder and harder to make a mass change necessitated by some change in hardware behavior.  And if you wanted to build a new computer that would run all those programs correctly it had better behave exactly like the current one.  Collectively, this set of rules defining what the software expected of the hardware came to be called "computer architecture".

So at this point it looks like software has gotten hard and hardware has gotten even harder.  But that's where microcode comes in.

At the same time people started becoming aware of the whole "computer architecture" thing elaborate "instruction sets" came to be developed.  This meant that the functional unit that decoded the instructions and then set the various functional units up to do the actual work became quite complicated.  At some point someone (exactly who that someone was is lost to the mists of time and besides several people probably hit on the same concept at roughly the same time) said "why don't we treat this whole "instruction decode" business as a special kind of programming problem.  We'll set up the decode unit with its own instruction set that is custom designed for the task at hand and write a program to sort things out.  That way we can keep the complexity of the hardware manageable because we can now break the "decode and hand off" process down to a series of steps, each of which is relatively simple.

This sounds like a dumb idea.  This adds another layer to everything and that should slow things down.  But it turned out the extra layer made hardware design much simpler and clever tricks were found to keep things speedy in spite of the apparent additional complexity.  The hardware part of the computer could now be built up of relatively simple functional units.  And that made it easier to make the functional units blazingly fast.  Programming a "computer within the computer" handle all the quirks and peculiarities of the instruction set was hard.  But it was easier than designing the incredibly complex hardware that would otherwise have been necessary.

Microcode was so successful that it is how all computers have actually worked for more than a half century.  An early success for this idea is the IBM/360 line of computers introduced in 1964.  Models ranged from the very basic and cheap 360/20 to the "supercomputer of its day", the 360/90.  From a purely hardware standpoint none of them was actually an "IBM 360".  They are all very different sets of hardware that with the help of microcode that was customized for each model could successfully emulate an "IBM/360" computer.  As a result a computer program designed to run on an "IBM/360 architecture computer" would work properly no matter which of the 8 quite different IBM/360 model you picked to run it on.

And this was in spite of the fact that hardware setup for each model differed drastically.  Your program might run a whole lot faster on a 360/80 than it did on a 360/40 but as long as execution speed was not important if would work the same on either machine.  In fact it would run on later machines that didn't even exist when the program was written.  All that was necessary was that the machine conformed to the "IBM/360" architecture specification.

The capability of the native hardware on the smaller and less expensive models was modest.  But on that model the microcode would grind away on chunk after chunk after chunk of a particular instruction until it had the answer demanded by the architecture specification.  It may have taken hundreds or thousands of microcode instructions but in the end you had what you expected.  The faster, more complex, more expensive, models had much more capable hardware so it may have taken only a few microcode instructions to produce the same answer.  Since the hardware was faster in the first place and since far fewer microcode instructions had to be executed, from the outside the computer looked a lot faster.  But the point was both machines produced the same result.  If you had the money and the inclination you could get fast but the cost was high.  If you lacked one or the other you could get "it works".  It was just a lot slower.  But it also cost a lot less money.

This ability of microcode to permit the same architecture to be implemented at multiple cost and speed points was recognized right away.  But the other great advantage of microcode took longer to be appreciated.  The fact that microcode could allow quite different sets of hardware to be used to implement the same "architecture" freed hardware designers from the prison software had put them into.  It allowed them to make drastic changes.  IBM has since put out many "IBM 360 compatible" machines.

The hardware they are built from has changed radically in ways unimaginable to early computer designers, builders, and users.  But this idea of using microcode to implement an architecture on wildly different hardware platforms has been a key to the evolution in hardware we have seen over the decades.  And it has freed hardware people to make radical changes under the covers.  So hardware designs have turned out to be quite soft.  You can bend them and twist them in unbelievable ways and as long as the microcode implements the architecture correctly it's all good.

So for a long time we have been living in a world where hardware has become soft (changeable).  Change the hardware all you want.  As long as you come up with microcode that hews to the rules of the architecture everything will work fine when you are done.  At the same time we have long been living in a world where software has become hard.  Businesses still run software created in the '80s and '90s to run on "IBM 360 compatible" hardware even though such hardware has not existed in any practical way for a couple of decades now.  But microcode and "emulation" tricks allow that very same software to work just fine on hardware that looks nothing like the equipment IBM was selling back then.  And don't even get me started on the radical evolution of "Intel x86" hardware over the last few decades.

Let me wrap this section up by taking note of the movie "Hidden Figures".  It very nicely dramatizes the change in the definition of the word "computer".  In the early part of the movie we are introduced to a number of the members of a "computer department" at NASA.  These ladies' job consists of performing the very "chain calculations" in a "computer room" that I started this section off with.  But by the end of the movie these very same women are no longer "computers".  They are now "computer programmers" writing "programs" to run on a "computer", a machine that performs chains of mathematical calculations.  The movie even includes shots of an "IBM 7090" computer, one of the computers I discussed above.  Moving on . . .

I am going to arbitrarily date the start of the post-computer age to 1981, the year the IBM PC was introduced.  A case can be made for moving the date to a few years earlier or pegging it to a different event or moving it to a few years later.  I'm not going to argue the point because frankly my "line in the sand" is arbitrary.  There was no sharp dividing line.  The far more relevant question, however, is:  what the heck am I talking about?  I own something called a "computer" and I just bought it recently, you say.  So why aren't we still in the computer age?  That seems like a reasonable perspective because it is a reasonable perspective.  It's just not the perspective I am applying.  So let's get into the perspective I am applying.

I talked about the later days of the pre-computer age and the early days of the computer age in terms of chained computations.  And my point is that they were just that, computations.  Early computers were devoted to doing computations.  You put numbers in and you got numbers out.  And that was the point, numbers.  This was definitely true of what I call the computer age.  For instance in the early part of the computer age computer makers saw the market for computers as consisting of two segments, business computing and scientific/engineering computing.  It was so hard to build computers in the early days that manufacturers designed different machines for each segment.

Two kinds of businesses that were early adopters of business computers were banks and insurance companies.  With banks, for instance, the books had to balance to the penny.  Numbers were known with complete precision (the amount of the check is exactly $134.26).  Everybody's checking account was supposed to "balance" (be accurate to the penny).  The bank's books as a whole were supposed to "balance".  So banks needed computers that could hold numbers as exact values of moderate size.  Back in the day the bank I worked for needed to be able to handle numbers as large as a billion dollars and an interest rate that was accurate to 3 decimal places (8.683%).

But they didn't need to be able to handle truly giant numbers and they didn't need to be able to handle really tiny numbers.  They needed what I will call "abacus math".  Numbers were stored as exact quantities and arithmetic was performed on numbers consisting of digits.  Interesting enough, the ENIAC did arithmetic with digits.

Now consider the dimensions of your house.  Do you know exactly how big your house is?  Of course not.  My house has siding on it.  If you pick different places you can measure the length of my house and get an answer that differs by two inches or more.  And if we come up with exactly where and how this or that dimension is to be measured how accurate is the measurement?  Plus or minus a quarter of an inch?  Plus or minus a sixteenth?  Whatever it is you do not know exactly how big your house is.  And that sort of thinking extends generally to engineering and scientific problems.

You know what the value of some number is only to within a certain precision, often stated as a number of "significant digits".  The precision with which you know the value of various numbers varies with circumstances.  Sometimes you only have a rough idea of the actual value ("it's about ten miles to the store").  Other times the actual value is known with great precision.  The value of some physical constants are known to more than ten significant digits.

On the other hand sometimes it is important to handle very big numbers (i.e. the size of the Milky Way Galaxy) or very small ones (the diameter of a Proton).  The way that this is done is to handle the "value" of a number as one thing and where the decimal place goes as another thing.  Many of you may be familiar from a Chemistry class with Avogadro's number.  It is usually stated as 6.02 times 10 to the 23rd power.  This means we know it's value to 3 significant digits.  But the decimal point goes way over there.  This is an example of "slide rule math".  And someone who is good with a slide rule can usually get results that are accurate to three significant digits.  But the slide rule does not tell you where the decimal point goes.  You need to figure that out another way.

In the real world separating a number into a "value" part and a "where the decimal point goes" part is called Scientific Notation.  On computers it is known as Floating Point.  And interesting enough, the EDVAC was set up to do things the engineering/scientific way.  And whether a computer could handle business computations or engineering computations was important to early computer customers.  Because it was all about the numbers at that time.  And the time when it was all about the numbers is the time I'm calling the computer age.

But think of how computers are now used by most people most of the time.  The "numbers" application for the present age is the Excel spread sheet.  Excel is all about numbers.  And I am a numbers guy so I use Excel,  But I only use it a little here and a little there.  Mostly I do other things.  And the fact that most of what we now use computers for is "other things" is why I call the modern age the post-computer age.  It is no longer about the numbers.

And I arbitrarily date this change to using computer mostly for not number things to when the computer invaded the home.  That's an entirely arbitrary decision on my part.  A case can be made that the Apple II and the TRS-80 got there first.  And a case can be made that widespread home use of computers didn't happen until a few years after the PC came out.  There is no sharp line in the sand that we can use to mark the transition.  So since I am writing this post I get to pick.

Consider what I am using my computer for right now.  I am doing word processing.  Sure, under the covers all the letters and stuff are converted into numbers and then manipulated via arithmetic and such.  But in roughly 1981 the balance tilted.  People have very little use for spread sheets in their everyday lives.  They are, however, heavily invested in texting (a crude form of word processing), scanning the web (arguably a very disguised form of database manipulation), or dealing with audio and video (word processing for sounds or pictures).  All of this may involve manipulating numbers under the cover but it is mostly not about the numbers.  The numbers are just a means to a non-numerical end.

And there is a lot of number crunching still going on.  I write this as a hurricane is pasting Texas.  And the weather models that are used to predict what's going to happen are an extreme form of number crunching that was unimaginable during the computer age.  But there are literally hundreds of millions of computers that are dedicated to non-numeric uses like texting, scanning the Internet, and watching videos.  That pattern of usage completely overwhelms the computers that are primarily used for number crunching.  And that represents a change as profound as the transition from the pre-computer age to the computer age.

So okay I did fudge and throw in the names of some people and some computers.  And I did talk about some technical stuff.  What can I say?  Quoting Jessica Rabbit from "Who Framed Roger Rabbit", "I'm just drawn that way".  But I do think I have delivered a very unconventional brief history of computers.  Yes I do.

No comments:

Post a Comment