Lecture 2: Computers
Existem vários tipos de computadores. Today, when we say
we mean a digital computer. Historically, there also existed mechanical
and analog (electrical) computers.
The first mechanical computer was designed by Charles Babbage in the beginning of the 19th century (around 1815)! For this reason, Babbage is often called "The father of computing". Famous is also his Difference Engine. If you want to know more about Charles Babbage, click here.
The first electronic computer, processing data in digital format was called ENIAC just before the second word war (1939). The first commercially available computer was the UNIVAC (in 1951). At that time it was thought that a handful of computers, distributed around the world, would be sufficient to take care of all computer calculations. Nowadays, nearly everybody in the western world has a computer at home, much more powerful than those first computers.
Computers are categorized by both size and the number of people who can use them at the same time:
|Supercomputers||sophisticated machines designed to perform complex
maximum speed; they are used to model very large dynamic systems, such
as weather patterns.
An example is the Cray SV2 (see picture), which is the size of an average living room.
|Mainframes||the largest and most powerful general-purpose systems, are
to meet the computing needs of a large organization by serving hundreds
of computer terminals at the same time.
Imagine insurance companies with all their documents internally shared over a network. All employees can retrieve and edit the same data.
|Minicomputers||though somewhat smaller, also are multiuser computers, intended to meet the needs of a small company by serving up to a hundred terminals.|
|Microcomputers||computers powered by a microprocessor, are subdivided into
computers and workstations.
Personal computers are what most people have at home.
|Processors||Many home appliances, like washing machines and ovens, contain a small processor that is controlling the machine. These are very small computers that have been programmed in the factory in hardware and cannot be programmed by the user. As such, they can probably not be considered computers, but are still important to mention. Some more-advanced home appliances, like satellite receivers or home-cinema equipment, are running quite sophisticated programs which follow the rules which will be presented in this lecture.|
Note: with the speed the technology is advancing we can say that "the supercomputers of today are the (personal) microcomputers of tomorrow"
Every working computer consists at least of the following:
1) A processor
2) Memory to store the program
3) An output device
4) A program running
Most computers also have
5) An input device, to either change the program running, enter new data to be processed, or control the processes running.
Table: hardware elements
|Mouse||input device||to control the processes of the computer|
|CPU||processor||Central Processing Unit
is what is doing all the work. Calculating, controlling data flow, etc.
||input device||input data to a game|
|Keyboard||input device||to give instructions to the computer
or enter data to be processed
||storage||store program and data to be processed|
||output device||show results of processes|
||output device||show results of processes|
communicate with other computers over a telephone line
|Network card||input/output||communicate with other computers over a high bandwidth network|
||storage||store data or programs in non-volatile format (data will stay
the computer is switched off)
|CD-ROM||input||load programs or data into the computer memory|
||output||play music or other sounds|
|Scanner||input||scan an image|
At the next level we find Electronics. Electronics connect materials with different properties and the resulting electronic components show remarkable and usefull behavior. Note the diode which conducts current only in one direction, or the transistor, whose conductivity is controlled by an external voltage.
Next we find the level of Digital Electronics. This involves
so-called gates: OR, NOR, AND, NAND, XOR, to name a few. Such gates are
made up of basic electronic components like transistors. Gates are the
cornerstone of digital computers. We have to remember that all
of computers at the end are done on this level. When we add 2+2,
in the computer gates are switching and are performing calculation
"1 OR 1 = 1".
Another important component of digital electronics is memory. These are also made up of transistors (and capacitors in case of dynamic RAM) and can temporarily store information.
The next level is that of Integrated Circuits. In these circuits, millions and millions of gates are connected and this allows for complex programs to run.
In the years since the first integrated circuits, the number of transistors on a single IC has been doubling every two years, approximately. This is calles Moore's law and is still avlid, although the physical limits seem to be in sight. See the picture on the left.
To make a popular comparison. If the same industrial advance had been made in the car industry, a modern car would be able to run at 5 million km/h, consume 1 drop of petrol per 100.000 km and could seat about 10 thousand people
At the next level the real programming starts. We start with binary programs, or (in readable format) Micro-assembler. This is directly programming the processor: put address xxx in address register, enable addressing lines, wait xx ns, add register X to register Y, etc. ("registers" are small memory units inside the processor)
The next level consists of Machine language. This is
programming the processor with binary code like
which might mean: put the contents of address 0000101000 into the A register. Such code is nearly impossible for humans to read. Therefore, very rapidly macro-assembler were invented. When a program is executed, this code is (without further translation) directly put in the memory and executed. Files with extensions like ".exe" and ".com" in MS-DOS and Windows are of this type.
For the next level, which already starts looking like real
we have Macro-assembler. In this level we instruct the
to execute the small programs written in microassembler. These are
to machine language, but in a more readable format and with the first
of higher level programming (for instance "labels" and "variables"). In
macro-assembler we write commands like
which might mean "add the contents of memory at address $2050 to register A" and which is translated by the assembler into machine code.
At the next level we finally have our modern Programming
These languages are often called "fourth generation languages", because
they evolved from earlier languages such as assembler, etc. Many of
programming languages were invented during the 1960s and and 1970s. For
every application there exists a programming language. In 1995 there
about 2500 different programming languages. (for people interested, see
For professional programmers there is C and C++, for simple applications, there is BASIC. For educational purposes PASCAL was invented, especially to teach the ideas of programming.
|BASIC||IF A=20 THEN PRINT"Hello World"|
|PASCAL||if (a=20) then writeln('Hello World');|
|C||if (a==20) printf("Hello world\n");|
|FORTRAN||IF (A .EQ. 20) PRINT ,'Hello World'|
Lately new generations of programming languages are evolving. All of them involve the concept of Object-oriented programming, a concept that we will not use in our lectures, but has become indispensible in modern program environments. We might call this "fifth generation languages"
Modern programming languages are very flexible. We can write a
of applications in the languages. We might, for instance, write a
that simulates the workings of a diode, or calculate a transistor at
physical level. Then we are full-circle; we will use the computer to
the basic components - and thus the computer - better and faster.
Also, bear in mind, that if we write in Pascal
and run the program, we are, in fact, controlling the flow of electrons on the lowest levels. This might give you a good feeling of control .....
In most modern version of a programming language we will work within a so-called IDE (integarted development environment), which means that we can write the program and with a single keypress we can compile the program, see the errors of our writing, and, in case there were no errors during compilation, execute the program and see the results. Such environments greatly speed up the development of software, but we should not forget that in fact a compiler is translating the program for us.
We will discuss compilers later and the use of compilers will
be explained in the practical lessons.
most famous operating system was probably MS-DOS by Microsoft. This was
a command-line operating system, meaning that you had to type-in your
to the computer using a keyboard. For example
Later, a graphical interface was added to MS-DOS and it was called Windows. Underlying it, was still the same MS-DOS command line operating system, but our mouse-clicks on icons and objects was translated into commands. We might click on a 'folder' and see its contents. Clicking on a folder would then be equal to typing DIR, with the output presented in graphical format.
Over the years, Windows has become more advanced and nowadays it is a multitasking operating system (meaning that more than one program can run at the same time) and most people in the world are using it.
Because of the monopoly that Microsoft has, the 27% of the shares that co-founder Bill Gates has in this company had a value of $20 billion (20.000.000.000 dolars) in 1995. By 2000 it had risen to $65 billion. Note, this is about $10 for every person on earth, be it an American or a Chinese in whatever remote village in China.
Alternatives to Windows are Unix/Linux, which has the advantage that it is for free and MacOS, which runs on Macintosh computer, as described above.