A computer is a general-purpose device that can be programmed to carry out a set of arithmetic or logical operations automatically. Since a sequence of operations can be readily changed, the computer can solve more than one kind of problem.
That seems quite complicated, if I have to know all that to use computer to do my math, I probably will just count on my fingers, or maybe a calculator, if not an abacus.
Let’s describe computer in a more user understandable way. Computer is a robot, it will do exactly what we ask it to do, assuming we speak the language Computer understands of course. Computer ‘listens’ to us through keyboard/mouse, computer ‘tells’ us what it has done through screen, which is often called monitor. Computer ‘friends’ with other electrical devices through its ports: USB, serial etc.
Computer also likes to be social, they ‘talk’ to each other through network, and often exchanges lots of information with each other without us even knowing.
And of course Computer needs power, which is available either from a wall plug or the battery that comes with it.
That is the outside of it, Computer has magic parts inside as well.
First, Computer has storage to store our files such as pictures, movies, and the program that we are going to write. This storage is usually called disk or drive. The important thing for storage is that we can trust them that our files will not go away even if computer lost power.
Then there is a part called memory, so Computer can temporarily hold stuff there without going to actual storage place. You have a full shelf of story books at home, you’ll still want to put a few of your favourites in your backpack. It is much easier and faster to check out book from your backpack than taking a trip back to home to get it. The key to memory is access speed, but anything Computer puts in memory gets lost when computer lost power. We’ll talk more about memory when we get to actual programming part.
The heart of Computer is called CPU, the Central Processing Uint, this is the big boss, who manages disk and memory, and takes our programming input and commands the other parts of the Computer to do the job.
CPU itself knows about how to work with the other part of the Computer, but does not know how to get the actual job done. Our brain knows how to drive our legs to walk, but we need to learn to get instructions in order to plan a trip to the Great Wall China from Chicago US. CPU gets instructions from its super boss, you, the programmer.
There are many instructions CPU understand, to read or write disk, to read keyboard input and monitor mouse movement, to display text and graphics on monitor, to play sound etc. It is a big task to learn to understand all those instructions all at once, although eventually we’ll learn to program them directly by sending instructions to CPU to drive different part of Computer, we do not start that way. Instead, we start with a piece of software written by other programmers.
This piece of software knows to send the right instructions to CPU to do basic things. For example, if we press letter ‘T’ on keyboard, this software informs the display to also display ‘T’ at the right place. If we move the mouse, this software knows to move the cursor accordingly on screen display. When we are tired, this software will take our request and politely shut down the Computer itself.
Before we start our programming adventure, we have a few words to say about this important piece of software.
This software is called Computer Operating System, or OS …