Home                                             Up

Understanding Components and Operations
 

 

Before we can begin programming we must first understand basic computers, what they are, and what they do.  There are two major components of the computer system, the hardware and the software.  It is assumed that if you are interested in programming you are already aware of the hardware.  In fact, seeing as how this is all appearing on the internet, it is also assumed you are aware of the internet and how it basically works.  That being said much of what is here is going to appear to be of the most simple nature but it must be understood in order to go into programming effectively. 

Hardware is the equipment associated with the computer.  This includes the CPU, the Ram, the Input/Output (I/O) devices, printers and storage devices.  All of these devices however, are capable of doing nothing without some sort of instructions.  The instructions are what we call software.  We also often call these instructions, programs and scripts and they are written by programmers.  This site is devoted to the learning of the process of writing these programs by the total beginner.

Working together computer hardware and software accomplish four major operations:

     1.  Input
     2.  Processing
     3.  Output
     4.  Storage

Input is the data or facts that you enter into the computer in one way or another.  Hardware devices such as keyboards and mice are the most common input devices  You may also enter data through input from disk drives, tape drives, hard drives and scanning devices.  Processing data items may involve organizing them, checking for accuracy or performing mathematical operations on them.  This processing is performed by the central processing unit or cpu of the computer.  After the processing the information is then sent to some form of output device such as a printer or monitor so the user can view, interpret and use the results.  Many times you will also want to store the results on storage hardware, such as, compact disks, tapes or hard drives.  A new and very popular storage device is the usb smart drive that can fit on a key ring.  Computer software consists of all of the instructions that contain how and when the data are input, processed, and the forms of output and storage.

Computer hardware in and of itself is useless without the instructions in software, much like your stereo is useless without the music on the CD you play in it.  You can buy software with the instructions or you can write your own instructions and save it to the hard drive or some other storage device   You can enter the instructions through any devices you use for data but usually you will write your instructions using the keyboard and store them on disk, usb stick, cd or your hard drive.

You write your software in a programming language.  That language may be basic, Pascal, Cobol C++ etc.  There are hundreds of such languages to choose from.  The most popular for general use are the Microsoft packages of Visual Programming languages that come in Visual Studio, and C++.  There are also programs that are primarily used for writing programs for use on the internet like PHP, JAVA and Pearl.  Some programmers write in only one language while others use several different languages as needed for the task at hand.

Each language has its own rules governing the use of words and punctuation.  These rules are called the languages Syntax.  The syntax differs with each language you learn but as you become more involved in programming you will find many similarities between them.  The basic logic of programming however will remain nearly the same despite the language you select. 

Every computer runs on circuitry that has millions of on-off switches controlled by series of 1's and 0's representing on and off.  Each programming language uses a piece of software to convert its instructions in that series of 1's and 0's called machine language.  The language translation software is called a compiler or interpreter and it tells you if have uses a programming language incorrectly by using incorrect syntax.  Therefore syntax errors are usually fairly easy to find and correct.

Different languages choose between compilers and interpreters. A compiler translates the program you write before it is loaded into your computer whereas an interpreter translates the program as it is running.  By; nature the compiled program will usually be smaller in size and run faster than an interpreted program.  You the programmer do not choose which the language will do.  It is built into the language and is one of the factors that programmers take into consideration when deciding which language. to use.

For a program to work properly, you must give the computer its instructions in a particular sequence.  You must not leave out any instructions and you must not put in extraneous instructions.  This is how you develop the logic of your program.  A simple illustration of this concept is to show a person how to make a cake.  Suppose you gave them the following instructions:

     Stir
     Add two eggs
     Add a gallon of gasoline
     Bake at 380 degrees for 30 minutes
     Add three cups of flour

Obviously following this recipe would most likely in up in disaster.  It is out of sequence and it has instructions that do not belong in the recipe.   It would be much easier to find an error of misspelling of eggs than it would be to find out that the wrong number of eggs was specified. 

The above example could have been written in French, German or Spanish instead of English.  In the same way the program can be written in any programming language but the logic required would be the same in a different language wither spoken or programming.

   

 

 



ŠKurburski Web Solutions
Mountain Home
May 5 2006