Friday, August 28, 2009

Computer Literacy 101 -- what are programs?


Data falls into two categories, as we saw in the previous blog. These categories are instruction data and program data. Instruction data can also be called a program -- which makes use of the program data to fulfill its purpose. Many times, a program will be called an application. Most people refer to programs as applications if they are widely used by different people. A word processing program may be considered an application. A spreadsheet program may be considered an application. Programs that people do not directly make use of are usually not called applications.

Programs consist of a sequence of instructions that tell the computer what to do. In the first blog of this series, we mentioned the types of instructions that may be given a microprocessor. These instructions are called machine language because they are sets of datum that are interpreted directly by the microprocessor. For example, the decimal value of 026002 will tell an HP 2100 computer to "jump" (change the current address for the next address) to address 002. The 026 portion is a "change the current instruction address to" code for the microprocessor and the 002 portion tells it the new value for the instruction address. Frankly, you don't really want to know much more than that unless you are involved with microprocessor design. Most microprocessors have their instructions written in binary (0s and 1s) or hexadecimal (symbols 1 through F for each numerical location) but the computers of the "early days" were not always standardized.

There is a hierarchy of languages used to program computers. At the base is machine language -- normally represented by a series of 0s and 1s -- like 10011001100011100011111101011110 -- which would be considered 32-bits. Current-day programmers almost never use machine language directly. The next level is called assembly language which uses a set of readable codes that can be directly translated into machine language. An example of assembly language might be "JMP START", where JMP is the operation to be performed and START is a symbol for an address that is the value to be used by the operation. The next level consists of many different languages in a family called high-level computer languages. A compiler changes the high-level language into assembly language (or, sometimes, directly into machine language. An assembler changes the assembly language into machine language. Finally (at least, at this current point of time) there are machine-independent languages which are used to create programs that may be run on many different computers without being changed.

Programmers write programs. Very few write machine language programs. More, but not many, write assembly language programs. Most write programs in high-level languages. An increasing number write programs in machine-independent languages (such as Java). However, all of them end up actually creating machine language -- with special programs such as Java interpreters/compilers, compilers, and assemblers acting to make it into this special, final, form.

I said earlier that some programs are visibly used by people -- and these are called applications. The ones that are NOT visibly used by people are sometimes called system programs. These are programs that enable to computer to perform the acts that people want. A printer program will be used to allow people to print a document from their application. At the core of all of the system programs is a particular program called an operating system and this will be addressed in the next blog.

No comments:

To Waste or to Waist: That is the question

       As is true of many people growing up in the US, I was encouraged to always clean my plate (encouraged is putting it mildly -- I remem...