How do computers work?

  • 40 Replies
  • 24345 Views

0 Members and 1 Guest are viewing this topic.

*

Offline mikemaas

  • First timers
  • *
  • 6
    • View Profile
How do computers work?
« on: 08/02/2009 11:39:57 »
After several years owning a machine and going to courses on Word, Excel, emailing and elementary web-building, I`m still baffled the moment anything goes wrong. It`s because I still have no understanding of what goes on inside my computer.

   Has nobody written a book of about 200 pages for the educated, numerate reader, plus fat glossary of all the jargon ?

  Answer, I think, is no ! A few years back I spoke to a prof of electronic engineering at Imperial College. He put me on to a prof Wilkes at Cambridge who simply said the documentation`s lamentable. I`ve also reccently emailed pro Chris Bishop, who replied that I should search in bookshops. I`ve done it. Can`t find anything.

I wonder if you can suggest something.

Mike Maas

Mod Edit - Formatted subject as a question - please do this to help keep the forum tidy and easy to navigate - thanks!
« Last Edit: 10/02/2009 13:14:57 by BenV »
 

*

Offline Vern

  • Neilep Level Member
  • ******
  • 2072
    • View Profile
    • Photonics
Re: How do computers work?
« Reply #1 on: 08/02/2009 17:05:00 »
I've spent a lifetime learning about computers and I still get stumped by problems that can happen in them.

If you Google the phrase: how do computers work; you will be rewarded with:

How computers work


*

Offline Don_1

  • Neilep Level Member
  • ******
  • 6890
  • A stupid comment for every occasion.
    • View Profile
    • Knight Light Haulage
Re: How do computers work?
« Reply #2 on: 09/02/2009 15:48:55 »
A question many would like answered, if only they could get their B****Y computers' to B****Y WORK!!!
If brains were made of dynamite, I wouldn't have enough to blow my nose.

*

Offline Vern

  • Neilep Level Member
  • ******
  • 2072
    • View Profile
    • Photonics
Re: How do computers work?
« Reply #3 on: 10/02/2009 12:48:32 »
A question many would like answered, if only they could get their B****Y computers' to B****Y WORK!!!

Wouldn't it be so nice if computers did what you want them to do instead of doing what you tell them to do?   [:)] [:)]

*

Offline Ultima

  • Sr. Member
  • ****
  • 488
    • View Profile
    • My Homepage
How do computers work?
« Reply #4 on: 26/02/2009 00:40:36 »
mikemaas what kind of thing were you hoping to learn about? There are three big hows, how does the software work, how does the hardware work, and how do these work together. Inside each of those topics it gets fairly complicated too. You might want to try finding short introductory books about "Computer Architecture" another about "Programming" and a final one about "Operating Systems". That covers the serious business. If you just want to know why software fails that's nothing to do with the computer. It's all down to the less than mechanistic humans that create the software you use... they are only human after all!  [;)]

Also long time no see to anyone who still remembers me... I asked for this part of the forum to be setup ages ago, and then kind of vanished leaving everyone else to pick up on computer type questions... sorry! [::)]
wOw the world spins?

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #5 on: 26/02/2009 09:25:27 »
A question many would like answered, if only they could get their B****Y computers' to B****Y WORK!!!

Wouldn't it be so nice if computers did what you want them to do instead of doing what you tell them to do?   [:)] [:)]

The art of programming - turning what you want into a series of linear steps. Controlled, linear thinking is not always easy.

I am reminded of a little example told to me years ago. Say to someone "Go to the shop for me and get a loaf of  bread. Take the money from my wallet on the table"

A human would know to get the money before going to the shop whereas a computer would follow the instructions as given and go to the shop then crash because it had no money; the instruction to get the money had followed the instruction to go to the shop. When we reach the point where computers can re-arrange their instructions into the correct order then we'll be getting there. 
« Last Edit: 26/02/2009 13:25:20 by DoctorBeaver »
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #6 on: 26/02/2009 11:18:09 »
At a very basic level you have read/write memories, instruction sets in read only memory and of course input/output devices.
you use your input device to load data into your r/w memory and tell your instruction set what to do with it.
In the computer you have sitting on your desk this all lies beneath about ten further levels of complexity!!!
syhprum

*

Offline techmind

  • Hero Member
  • *****
  • 934
  • Un-obfuscated
    • View Profile
    • techmind.org
How do computers work?
« Reply #7 on: 04/03/2009 23:49:38 »
After several years owning a machine and going to courses on Word, Excel, emailing and elementary web-building, I`m still baffled the moment anything goes wrong. It`s because I still have no understanding of what goes on inside my computer.
...

Part of the trouble is that there's so much complexity in the software that merely knowing how the computer (hardware) works will still leave you stuck when things go wrong. It's a bit like having a car and being a mechanic - but you can still get stuck because the roads are complicated and you don't have a map.

On the other hand, being a "mechanic" and knowing roughly how "roads" work will give you a bit of a head start.


Basically in your computer you have:
 - memory which is short-term storage, which might be very short term and is erased in any case when you switch off.
 - hard disk which is principally long-term storage, retaining vast amounts of information for years if required, (hopefully) - even when switched off
 - processor (or CPU) which does calculations, fetches data from memory, stores data back to memory, can oversee the copying of data between the hard disk and memory, can oversee the copying of data between memory and USB devices etc and runs programs or software. It does these simple things very very fast, hundreds of millions of simple add/subtract/compare steps per second.
 - software also known as programs (American spelling deliberate) which comprise (extremely) long series of instructions, a bit like a recipe, which tells the processor how to accomplish a complex task (like a functioning wordprocessor) in terms of simple operations that the processor can do directly (fetch-data, copy-data, do calculations on data, branch if this data is bigger than that data etc).

Modern software is so complicated that no human could comprehend creating some big application like MS Word in terms of very simple add/subtract/store instructions. And you'd be reinventing the wheel all the time - there's a lot of commonality between different software.

So... we create various "abstractions" or tiers of software. This goes from "low level" which means based on simple commands/instructions (add/subtract etc) to "high level" which is much more complicated and abstracted like presenting the user with an Open File dialog box. The "low level" side of things are obsessed with details, while the "high level" is more big-picture stuff. It's loosely heirarchical, so the "high level" application can call upon the services of "lower level" routines, which in turn call "level level" routines still - a bit like an army commander passing orders down the various ranks to get a job done.

Very broadly and traditionally, the Operating System is at the lower-level of the scale and the Applications are at the higher end. In reality, a complex operating system such as Windows pretty much spans the whole range.

Example: an simple image viewer program
After the user has chosen an image file - perhaps from a File-Open dialog box, the Application issues a command like "DisplayImage(filename)"
This "DisplayImage()" is very high-level
it naturally subdivides into two sub-functions; loading the image-file off disk and converting that image-file into a recognisable picture
Loading the image-file off disk involves finding out exactly where on the disk it is stored (and it may well be in several separate pieces) and issuing requests to the disk drive to hand over the data.
Unless the image is a simple BMP file, there will be a lot of logic (GIF/PNG) or maths (JPG) to convert the data from the file into a visible picture.



Now, 25 years ago you could only run one program (application/piece of software) on your computer at a time, and that application had (near) complete control. This might have been a bit limiting for the user, but it did mean that the overall system was in a well-defined and repeatable state whenever that application/program was running, so things didn't have too much scope to go wrong. The main operating system of the computer was stored in uncorruptable Read-Only Memory, and the computer would be in the same state as it left the shop whenever you turned it off and on again. Ahh, so simple. Of course you couldn't personalise anything.

Today we have many programs all running concurrently, Word Processor, streaming audio, anti-virus programs, may a few Internet Explorers, not to mention USB hardware devices like cameras and broadband modems and memory sticks all shuffling data around simultaneously! The processor at the heart can still only do one thing (or two things if dual core, or 4 if quad core) at a time, and in the detail is in fact selectively switching its effort between all the parallel tasks in (usually) imperceptibly short timeslices. The shear complexity creates all sort of potential for unexpected interactions between programs.

Furthermore, all the operating system, programs, and millions of customisation and configuration settings and parameters are stored on a hard disk which can (although shouldn't) be re-written, modified, or corrupted at any time.

Recipe for disaster. Yes. To be honest, it's amazing it works as well as it does.


Things that can (and do) go wrong
 - faulty hardware glitching (failing hard disk, faulty memory, bad contacts on memory) which may cause intermittent problems, or trigger permanent problems after a momentary glitch has corrupted programs or data (files) on the hard disk
 - software clashes (like my computer sometimes has issues recognising and communicating with other USB gadgets (digital camera, external DVD burner) while my 3G broadband modem is plugged in)
 - software bugs (faults) where a program will repeatably misbehave when a particular set of circumstances happen (eg an old wordprocessor I used would always 'crash' (jam up) if you inserted a picture too close to the bottom of the page)
 - MS Word has/had some bugs where the bottom sentence on a page becomes invisible then reappears. Also in various versions of Word, bits of Word Drawing Object pictures faile to print if they were more than 1024 pixels from the left-hand edge of the image.
 - unexpected "features" eg where pressing something changes the language of the keyboard and you do it by accident and have no idea how to put it back, or pressing and holding some key combination triggers "stickykeys" (Google it). Or in Word (do I have gripes with Word?) when I begin a sentence with "To" I only have to blink and its auto-put "To whom it may concern". That's not what I wanted.
 - more permanent software clashes/interference, such as the fact that the DVD-player software provided with my computer refused to play DVDs ever since I installed my DVD writer (which comes with its own DVD-playing software - with inferior picture quality). Ironically in my case this also had something to do with the copy-protection systems used on DVDs stopping me even watching them. Grrrr!
 - malware (malicious software) which includes viruses, spyware, trojans etc, which is software which gets on to your computer uninvited or by deception and does all sorts of stuff you wouldn't want to happen causing no end of trouble - usually these days so that somebody on the far side of the planet can try to make a fast buck at your expense (directly or indirectly). This might send spam behind your back, show adverts you never wanted, redirect you to websites you didn't wish to see, demand a ransom from you to have your computer back, form part of an organised "attack" on a third-party company on the internet (usually related to extortion)...
 - anti-virus software: works very hard to try to spot the hundreds of thousands of pieces of malicious software which are in existance and stop them in their tracks. Unfortunately all this checking can slow your computer down noticeably, occasionally it makes mistakes and will claim that something perfectly harmless (and which has been there for ages) is in fact harmful. If it then "removes" or "fixes" this mistakenly-identified virus this may cause big problems. Other times it will fail to stop something bad.
 - auto-updates: there are often "vulnerabilities" (defects) found in software which might allow malicious software a route in; people like Microsoft issue "updates" for these defects when they have fixed them. These "updates" or "patches" are newer versions of the original software, and as well as fixing problems, may sometimes introduce new features. Microsoft mostly issues updates/patches on the 2nd Tuesday of each month. Unfortunately the new software can occasionally clash with other things and cause new problems: Microsoft issued a fix last year which inadvertently caused common Bluetooth devices to stop working (I think - it was some such moderately widespread symptom). Microsoft's Update tries to force me to download a newer version of my modem driver, but I've found before that this reduces the top speed of connection I can achieve. If you have updates happening in the background automatically, they can cause occasional unexpected consequences... however the consequences of turning off the patching is that you're much more at risk of malware getting in. So you can't win.
« Last Edit: 05/03/2009 01:15:16 by techmind »
"It has been said that the primary function of schools is to impart enough facts to make children stop asking questions. Some, with whom the schools do not succeed, become scientists." - Schmidt-Nielsen "Memoirs of a curious scientist"

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #8 on: 05/03/2009 09:21:43 »
It is interesting to note that until Vista was released all MS Windows operating systems (WFW, 95, 2000, XP,etc.) rode on the back of MS-DOS which was written 25+ years ago. The software had to be modified continuously to handle new procedures and it grew into a totally unweildy and incomprehensible mess. If anything went wrong, rather than re-writing some of the basic code, another patch was issued. These patches then had to be patched,and so on. This is 1 of the main reasons why MS software was so prone to system failures/crashes.

It is also 1 of the reasons why Windows is so vulnerable to virus attack. Rather than being able to modify 1 routine, or a few routines, to prevent a particular type of virus attack, the code that needed to be altered was scattered throughout numerous updates and patches and impossible to track down 100%. That, in turn, led to more updates & patches being issued. In theory, Vista should be much easier to modify (I stress "in theory").
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #9 on: 05/03/2009 09:35:18 »
When I first encounted computers I had little Idea how they worked, I had grown up with knowledge of ring counters, mercury delay lines, cathode ray tube storage and other bits of 1940,s hardware but had no idea as to how they all fitted together.
About 1975 when 8080,s became popular I discovered instrution sets and it all fell into place, I still have a 64K CPM computer (the forerunner to DOS) in working order complete with circuit diagram.
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #10 on: 05/03/2009 09:49:50 »
I still have a 64K CPM computer (the forerunner to DOS) in working order complete with circuit diagram.



I remember CP/M. And DR-DOS. Do you remember Superbrain computers? I believe they ran CP/M.
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #11 on: 05/03/2009 10:46:45 »
The computer I have is complete with two 5.5" floppy drives and is labeled ALPHATRONIC built in Japan.
If you would like to renew your acquaintance with CPM simulators are available on the internet that run quite fast on a modern computer.
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #12 on: 05/03/2009 13:26:06 »
If you would like to renew your acquaintance with CPM simulators are available on the internet that run quite fast on a modern computer.

I think I shall pass up that opportunity.
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #13 on: 05/03/2009 15:28:03 »
I certainly remember seeing Superbrain computers in use several of the printing companies I used to visit in the early eighties had them.
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #14 on: 05/03/2009 15:31:32 »
I remember programming in COBOL on Superbrains  [:I]
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline MonikaS

  • Sr. Member
  • ****
  • 279
    • View Profile
How do computers work?
« Reply #15 on: 05/03/2009 17:00:55 »
COBOL? <shudder>
--------
I tried installing Jesus on my Scientific Method and I got a Blue Screen of Eternal Damnation.

*

Offline LeeE

  • Neilep Level Member
  • ******
  • 3382
    • View Profile
    • Spatial
How do computers work?
« Reply #16 on: 06/03/2009 00:07:07 »
COBOL is really good for collating and presenting data.  I rather liked it.
...And its claws are as big as cups, and for some reason it's got a tremendous fear of stamps! And Mrs Doyle was telling me it's got magnets on its tail, so if you're made out of metal it can attach itself to you! And instead of a mouth it's got four arses!

*

Offline MonikaS

  • Sr. Member
  • ****
  • 279
    • View Profile
How do computers work?
« Reply #17 on: 06/03/2009 07:19:21 »
Sure COBOL is good for such things, shuffling around huge amounts of data on mainframes. But I hated all this typing: ADD A TO B GIVING C or just c = a + b in other programming languages. COBOL fingers...
--------
I tried installing Jesus on my Scientific Method and I got a Blue Screen of Eternal Damnation.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #18 on: 06/03/2009 11:33:23 »
Siemens programing language for the R30/10 was much like this everything had to be specified in great detail, when you were setting up interfaces for peripherals and as the original language was German the grammar often seemed perverse
syhprum

*

Offline MonikaS

  • Sr. Member
  • ****
  • 279
    • View Profile
How do computers work?
« Reply #19 on: 06/03/2009 22:31:39 »
Sometimes I feel developers of those languages are sadists...
--------
I tried installing Jesus on my Scientific Method and I got a Blue Screen of Eternal Damnation.

*

Offline Don_1

  • Neilep Level Member
  • ******
  • 6890
  • A stupid comment for every occasion.
    • View Profile
    • Knight Light Haulage
How do computers work?
« Reply #20 on: 07/03/2009 14:49:14 »
Sometimes I feel developers of those languages are sadists...

Quite so, I think it's all a load of COBOLers.
If brains were made of dynamite, I wouldn't have enough to blow my nose.

*

Offline LeeE

  • Neilep Level Member
  • ******
  • 3382
    • View Profile
    • Spatial
How do computers work?
« Reply #21 on: 07/03/2009 22:49:34 »
Sure COBOL is good for such things, shuffling around huge amounts of data on mainframes. But I hated all this typing: ADD A TO B GIVING C or just c = a + b in other programming languages. COBOL fingers...
How can you complain that easily readable code is a problem, especially when your only real complaint is that you can't type very well?

The only thing that bugged me about COBOL was when you forgot a line-ending full-stop.  If you did this near the beginning of the code the compiler would complain that every subsequent line following the omitted full-stop had an error.  It could be quite alarming at first, until you got used to it, to get several thousand compilation errors [???]
...And its claws are as big as cups, and for some reason it's got a tremendous fear of stamps! And Mrs Doyle was telling me it's got magnets on its tail, so if you're made out of metal it can attach itself to you! And instead of a mouth it's got four arses!

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #22 on: 07/03/2009 23:33:18 »
LeeE - I remember that so well. A missing dot at the beginning of a 10,000+ line program. Reams & reams of printout. However, later COBOL compilers were smart enough to handle that situation and worked as if the dot were actually there.

Another good 1 was mis-spelling a peripheral device name and watching the whole machine crash.
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline LeeE

  • Neilep Level Member
  • ******
  • 3382
    • View Profile
    • Spatial
How do computers work?
« Reply #23 on: 08/03/2009 14:28:05 »
Quote
Another good 1 was mis-spelling a peripheral device name and watching the whole machine crash.

Ah yes, those were the days... [:D]
...And its claws are as big as cups, and for some reason it's got a tremendous fear of stamps! And Mrs Doyle was telling me it's got magnets on its tail, so if you're made out of metal it can attach itself to you! And instead of a mouth it's got four arses!

*

Offline techmind

  • Hero Member
  • *****
  • 934
  • Un-obfuscated
    • View Profile
    • techmind.org
How do computers work?
« Reply #24 on: 09/03/2009 22:16:34 »
...
The only thing that bugged me about COBOL was when you forgot a line-ending full-stop.  If you did this near the beginning of the code the compiler would complain that every subsequent line following the omitted full-stop had an error.  It could be quite alarming at first, until you got used to it, to get several thousand compilation errors [???]

C or C++ can be almost as bad if you miss out the end-of-line semicolon!
« Last Edit: 09/03/2009 22:18:20 by techmind »
"It has been said that the primary function of schools is to impart enough facts to make children stop asking questions. Some, with whom the schools do not succeed, become scientists." - Schmidt-Nielsen "Memoirs of a curious scientist"

*

Offline LeeE

  • Neilep Level Member
  • ******
  • 3382
    • View Profile
    • Spatial
How do computers work?
« Reply #25 on: 09/03/2009 22:20:49 »
Different scale entirely - C/C++ compilation aborts pretty quickly but the COBOL compiler will just plough through all of the source before stopping, even if the fault was in the very first line of the logic.
...And its claws are as big as cups, and for some reason it's got a tremendous fear of stamps! And Mrs Doyle was telling me it's got magnets on its tail, so if you're made out of metal it can attach itself to you! And instead of a mouth it's got four arses!

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #26 on: 11/03/2009 03:47:08 »
It normally happened before you even got to the logic with a dot missed in Environment Division.

For those who don't know COBOL, the Environment Division is the very first part of the program. It describes the environment on which the program will run and includes descriptions of the configuration settings and I/O devices. For instance:

 ENVIRONMENT DIVISION.
     CONFIGURATION SECTION.
         SOURCE-COMPUTER. IBM360.
         OBJECT-COMPUTER. IBM360.

 INPUT-OUTPUT SECTION.
    FILE-CONTROL.
    SELECT NAME-ADDRESS-FILE ASSIGN TO "\TMP\SAMPIN" ORGANIZATION IS LINE SEQUENTIAL.
    SELECT PRINT-FILE ASSIGN TO "\TMP\SAMPOUT".

Leave out 1 of those dots and everything from there on gets kicked out as an error. On some compilers (including 1 I worked with) it wouldn't just kick out every line,it would reject every character as it was looking for a dot. Then when it found 1 it would look for what it expected next, which of course wasn't there and so on. You could end up with a mountain of printout or errors.
« Last Edit: 11/03/2009 03:51:39 by DoctorBeaver »
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline yor_on

  • Naked Science Forum GOD!
  • *******
  • 12188
  • (Ah, yes:) *a table is always good to hide under*
    • View Profile
How do computers work?
« Reply #27 on: 11/03/2009 11:33:17 »
A question many would like answered, if only they could get their B****Y computers' to B****Y WORK!!!

Wouldn't it be so nice if computers did what you want them to do instead of doing what you tell them to do?   [:)] [:)]

Deep Vern, Very Deep...
And so true.

----
DB "Vista should be much easier to modify (I stress "in theory")."
(As a pure hypothesis, I would disagree to that theory:)
« Last Edit: 11/03/2009 11:37:23 by yor_on »
"BOMB DISPOSAL EXPERT. If you see me running, try to keep up."

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #28 on: 11/03/2009 14:45:56 »
Why would you disagree (apart from the fact that it's still Microsoft)?

Vista has been written in a far more modular and systematic way than any previous version of Windows. It should, therefore, be much simpler to make amendments to it.
« Last Edit: 11/03/2009 14:51:00 by DoctorBeaver »
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline LeeE

  • Neilep Level Member
  • ******
  • 3382
    • View Profile
    • Spatial
How do computers work?
« Reply #29 on: 11/03/2009 17:17:31 »
I've wondered about just how modular Vista is.  It still seems to require a lot of very deep integration for the security/DRM stuff to work, and that to me remains a significant weak point; with such deep integration, problems occurring in one sub-system quickly run through the deep integration paths to the rest of the system.
...And its claws are as big as cups, and for some reason it's got a tremendous fear of stamps! And Mrs Doyle was telling me it's got magnets on its tail, so if you're made out of metal it can attach itself to you! And instead of a mouth it's got four arses!

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #30 on: 11/03/2009 19:27:57 »
Could no one device a sub routine to detect a missing dot when you started the next line ?
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #31 on: 12/03/2009 01:46:06 »
I've wondered about just how modular Vista is.  It still seems to require a lot of very deep integration for the security/DRM stuff to work, and that to me remains a significant weak point; with such deep integration, problems occurring in one sub-system quickly run through the deep integration paths to the rest of the system.

A lot of the problems with pre-Vista versions of Windows was that they relied on an antiquated OS running below them - MSDOS. Much of MSDOS was originally written in assembler language as there were no higher-level languages around at that time that were able to implement system level functions (The only higher-level languages were COBOL, ALGOL, Fortran, PL/1, RPG and the like; and I think Pascal was just arriving on the scene too. There weren't even any assembler IDEs). Assembler languages do not lend themselves to modularity or structured programming techniques. It was often far quicker to write a small piece of code separately wherever it was needed rather than trying to implement a kind of re-useable pseudo function call.

Consequently if an error was later discovered there were many pieces of code that needed to be changed and they could be scattered anywhere throughout the OS. If your library was not spot on (if, in fact, there was a library at all - which there often wasn't back then) then that was next to impossible. The same error would pop up again & again in different places and under different circumstances.

Nowadays, however, we have techniques such as DLLs and excellent library systems. Plus, of course, higher-level languages such as C/C++ that can be used and others that have been invented specifically for writing OS-type applications. Modular programming is the norm. Modern IDEs make the task even easier.

The upshot is that if an error is discovered it will be much easier to trace and resolve. It may involve more than 1 routine, but each of those routines will be the ones that are used throughout the system; make a change and that change is effected everywhere.

I'm not sure how integrated the very low-level code in Vista is but that too should be easily modifiable with the lowest level functions having been coded only once.
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #32 on: 12/03/2009 02:05:51 »
A couple more points to consider.

It wasn't just the languages that were lacking in the old days of assembler programming. Programming itself was a very haphazard affair. Bob told Ted what needed to be done and Ted would get on with coding what he thought Bob meant. There were hardly any formal specifications and very little co-ordination. There was in large organisations, but MS was a very small company when MSDOS was originally written. It basically comprised a handful of geeks sitting in a room each with his/her own ideas of how it should work.

Nowadays even small systems have formal specs, flowcharts and copious other forms of documentation. All the functions and integration are identified before coding starts. "Egoless programming" techniques ensure that no-one guards their own code jealously so others can't steal their ideas.

Then, there is testing. Testing? What's that? Programmers used to test their own code and as a consequence most would use data that they thought would work just to make sure their code worked as it was supposed to when it was used as intended. But,of course, that isn't how things are in the real world. Users do silly things. Modern testing is on a much more scientific footing with the emphasis on trying to break the code rather than proving that it works.
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #33 on: 13/03/2009 10:59:37 »
To return to the COBOL missing stop problem, did you have to make a carriage return at the end of each line? if so could not a simple keyboard modification have been made to insert the stop?.
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #34 on: 13/03/2009 12:36:22 »
Compilers did get smarter and corrected minor errors such as missing full stops for you.

You would need to get a systems programmer to mod the keyboard mapping and they were always far too busy (Truth be told, they were too snobby to be bothered with trivial programmer's problems). I'm not entirely sure it could have been done anyway as most systems in those days used EBCDIC not ASCII.
« Last Edit: 13/03/2009 12:39:15 by DoctorBeaver »
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Online syhprum

  • Neilep Level Member
  • ******
  • 3894
    • View Profile
How do computers work?
« Reply #35 on: 15/03/2009 21:14:19 »
For anyone wishing to renew their aquaintence with COBOL a version that runs on a Windows machine is available on file sharing sites.
syhprum

*

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • 12656
  • A stitch in time would have confused Einstein.
    • View Profile
How do computers work?
« Reply #36 on: 15/03/2009 21:26:15 »
For anyone wishing to renew their aquaintence with COBOL a version that runs on a Windows machine is available on file sharing sites.

Pass
Fledgling science site at http://www.sciencefile.org/SF/content/view/54/98/ needs members and original articles. If you can help, please join.

*

Offline techmind

  • Hero Member
  • *****
  • 934
  • Un-obfuscated
    • View Profile
    • techmind.org
How do computers work?
« Reply #37 on: 16/03/2009 00:18:32 »
Modern testing is on a much more scientific footing with the emphasis on trying to break the code rather than proving that it works.

That's the ideal.
But in the real world, if the application is not life-threatening or safety-critical I think you'll often find that the nature of the testing depends on the application and how close you are to shipping-date. If the promised delivery date is 2-3 weeks time, only the most severe bugs found in testing will be remedied.
« Last Edit: 16/03/2009 00:22:06 by techmind »
"It has been said that the primary function of schools is to impart enough facts to make children stop asking questions. Some, with whom the schools do not succeed, become scientists." - Schmidt-Nielsen "Memoirs of a curious scientist"

*

Offline nicephotog

  • Sr. Member
  • ****
  • 390
  • H h H h H h H h H h
    • View Profile
    • Freeware Downloads
How do computers work?
« Reply #38 on: 28/03/2009 02:11:56 »
The idea of modularisation as you say, really only came about with higher languages and because the size of competitively economic software became gigantic to put together *link.
I believe the better terminology anyhow for modularisation in that context, is "OOP"  meaning Object Oriented Programming.
C(Objective C - various derivitives around the Bell Labs spec and ANSI spec) can only be modularised by DLL and .so e.t.c. under their own makes of C for the OS.
C++ is different, though in effect it's C also with the system of #IFDEF and angle bracket symbols for library joints and .h files , C++ is an OOP language of that the system of writing is not so much inline but a method of being able to join code by adding to a base module called an object with an extension tool packet called an abstract class.
OOP uses a system called classes that in effect is a/the "module" , code that has been designed to be streamlined and reusable for economic processor use in the program.
The classes are defined by a set of class variables created at startup with(and matching) a small instantiation program of the class called a constructor.



http://wiki.answers.com/Q/How_does_a_computer_work

A computer performs two functions,

1. Data processing.

2. Data storage.

and it has an Operating System(OS).


1. Data processing.

All data in a computer is represented by a binary(base 2) integer number stored within a finite quantity of binary point places(the same as a decimal place except this is the binary version) called a byte.

That byte is represented physically by the state of a special electric stored charge in the a temporary data memory storage hardware device called Random Access Memory(RAM).

To commit processing upon data The data stored in the RAM, is fed sequentially through a Central Processing Unit(CPU) that contains special circuits to re arrange the data by an action p/program-instruction called an operation through an operation circuit.
 

2. Data storage.

Two types of data exist.

Program instructions(to arrange CPU operations in a usable sequence) and user data.

Program instructions are represented exactly the same way as is user data(as binary integers in a byte) that has operations performed on it, for the computer to know which to use as data and which to use as a program the data is first located in a file with a notation to its filename-extension, different file-extensions will mean to use them for different purposes.

When data is not in use it generally is stored in permanent storage that does not require a continual power supply called a hard disc.
 

An Operating System(OS).

OS's are a special system set of instruction files that cause a computer to be able to start and cause the base minimum requirement of programs ready for a user to use it, to be easy to use, and easy to create add in programs for through a special programmers equipment called an Application Programming Interface(API) and OS compatible higher language compiler.

When a computer is started, an extremely tiny and simple permanently stored program picks up the OS first starter file that holds instructions for operations to start the OS. That program is stored in a special primitive part of a computers' main-board called a Basic Input Output System(BIOS) and uses main-board Chipset alike the ready OS uses the CPU and RAM.

*

Offline tsr

  • First timers
  • *
  • 7
    • View Profile
How do computers work?
« Reply #39 on: 08/04/2009 05:27:33 »
In the series "The Secret Life of Machines" Tim Hunkins dedicated an episode to the "Word Processor".
Someone put it on youtube: part 1, part 2, part 3.
This episode focuses rather on the basics (such as transistors and microchips) of computing. But it's funny. :)

@mikemaas:
I don't think that there can be a general handbook of computers, because the software running on them varies a lot. Narrowing your search down to software that you use might help.
« Last Edit: 08/04/2009 05:51:41 by tsr »

*

Offline ButHowDoItKnow

  • First timers
  • *
  • 1
    • View Profile
How do computers work?
« Reply #40 on: 07/09/2009 16:10:22 »
Dear Mikemaas,

I have googled this subject ad nauseum, and have found hundreds of non-answers just like you.

For me, the answer was simple, because I have had a very full career in the area. Many years ago I decided that I should write a book on the subject, but never found the time.

But in the last three years, I have made the time, and have finally produced a book that explains everything that computers do and exactly how they do it. There is quite a bit of detail, but everything you need to know is contained in the book, and it is laid out in the proper order so that it is very easy to understand. It is just over the 200 pages that you mentioned.

Of course I'd like to make a living from my work, but the desire to help other people understand the basic simplicity of computers was a a major driving force that kept me working at it through to completion.

The book is called "But How Do It Know? - The Basic Principles of Computers for Everyone" ISBN-978-0615303765
and is available on Amazon. There is more info at the website, buthowdoitknow.com

Enjoy! - J Clark Scott