Basic Concepts 5 – Computers and Programs

File:CADR - The Lisp Machine, late 1970s, view 1 - MIT Museum - DSC03747.JPG

In this article, we are starting to look at programs and computers. This is a complex matter and I will only touch a few aspects of this topic here.

We can think of a computer as a machine that processes data. We put in input data and it produces output data (I am only looking at the computer’s core or processor, leaving storage devices out of consideration for the time being).

The input data can be divided into two parts:

a) a program and

b) the data to be processed.

In this view, programs are just a special kind of data. They are used to instruct the computer what to do with the other data. It is possible to build special purpose computers that do not need a program but do only one kind of thing, but by using programs, the same computer can be used to do all kinds of computations, that is, data transformations.

We may say: the program processes (or transforms) the data. We may also say: the program calculates a result (output) from the input. What is actually happening is, of course: the computer (or more exactly: the computer’s processor) produces the output data from the program and the input data. But we don’t need to mention the computer all of the time.

So we can shift the computer out of view and pretend that the program itself is an active, machine-like entity. This is just another way of looking at the same process. The computer is always the same, so we do not need to talk about it all of the time when we are talking about programs.

Programs are just one type of data. In many cases, they will be “texts” (i.e. sequences of signs) of finite length, composed from a finite set of characters. The term “character” here includes not only lower case and upper case letters but also digits and some special characters. In computer science, such a set of characters is called an “alphabet”, even if digits, special characters and even blanks are included. There are some “graphical” programming languages where programs appear as graphical objects on a computer screen and can be manipulated with a pointing device like a mouse, but even then, these graphical programs are stored in files or groups of files that can be viewed as sequences of signs.

The program texts are structured according to the rules of a programming language. This is not a language in the normal sense of the word “language”, but an artificial system of signs or symbols. However, like a normal language, a programming language has something like a grammar.

For each programming language, it is possible to write a program that will take any text (i.e. string of characters) as an input and check if that text is a program of that particular programming language or not. This is an example of a program that takes other programs as input data to be processed. In this case the programs that are checked are not in control of what is happening, they are just treated as data being processed.

Likewise, there may be programs that produce other programs as their output. Here again, the program that is produced is not in control. However, it is possible that a program first produces another program and then starts that program, passing control over to it. So what is data at one time may become an active program at another time.

To understand the subsequent articles, it is not necessary to know or learn any programming language. I will present some thoughts about programs in general. These ideas and thoughts are independent of any particular programming language, so we do not need to look into the specifics of any such system of symbols.

You may wonder why I am tagging this text as “philosophy”. If you continue following this sequence of articles, you are going to find out in which sense such basic concepts of computer science can actually be considered to be basic concepts of philosophy.

(The picture is from https://commons.wikimedia.org/wiki/File:CADR_-_The_Lisp_Machine,_late_1970s,_view_1_-_MIT_Museum_-_DSC03747.JPG. It is showing an experimental computer (a “Lisp Machine”) at MIT in the 1970s. This was a machine that could be programmed in LISP, a programming language popular in the AI (artificial intelligence) community of the time. It is likely that the processing power of the smart phone in your pocket by far exceeds that of this machine).

Advertisements

One comment

  1. […] programming languages, we can decide if a given string of characters is a program in that programming language or […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: