Здавалка
Главная | Обратная связь

Computer programming.



Electronic computers.

Electronic circuits work a thousand times more rapidly than nerve cells in the human brain. A problem that takes the human brain 2 years in order to solve it can be solved by a computer in one minute. The heart of the electronic computer is its transistors. In order to work a computer must have instructions; this is called “programms”.

There are two main types of electronic computers: analogue and digital. In analogue computers problems are solved by analogy, the problems which analogue computers can solve are the following: mechanical forces, speeds, rotation, etc. Analogue computers are used for investigation of mechanical processes, in general, they are used for scientific and engineering problems in which great accuracy is not required but answers accurate enough are required quickly.

In digital computers problems are solved by counting. They may be very large and powerful. All the data connected with the problem which must be solved are converted into electrical pulses by very fast electronic switches and these pulses are stored and counted. With modern electronic devices a single switching operation can take place in a few nanoseconds.

What is a microprocessor?

A microprocessor is the central arithmetic and logic unit of a computer, together with its associated circuitry, scaled down so that it fits on a single silicon chip (sometimes several chips) holding tens of thousands of transistors, resistors and similar circuit element. A typical microprocessor chip measures half a centimeter on a side.

The task of the microprocessor is to receive data in the form of strings of binary digits (0 and 1), to store the data for later processing, to perform arithmetic and logic operations on the data according to the previously stored instructions and to deliver the results to the user through an output mechanism such as an electric typewriter. A typical microprocessor would consist of the following units: a decoder and control unit (to interpret instructions from the stored program), the arithmetic and logic unit, or ALU (to perform arithmetic and logic operations), registers (to serve as an easily accessible memory for data which are frequently manipulated), an accumulator (a special register closely associated with the ALU), address buffers (to supply the control memory with the address from which to take the next instruction) and input/output buffers (to read instructions or data into the microprocessor or to send them out).

Computer programming.

Programming is the process of preparing a set of coded instruction which, when executed by a digital computer, yield the solution of a specific problem or perform specific functions. Each computer and each programming language has its own unique repertoire, method of operation, etc. These should be studied and understood before preparing a program on a specific language for execution by a specific computer.

A computer has the ability to automatically execute a program stored within itself. During execution of the program, the computer performs various digital operations (adding two numbers, moving data in and out of storage, reading in or printing out data, etc.) If the stored program is changed, the actions of the computer change. Thus, the computer actions depend on both the configuration of the computer hardware (the physical computer equipment) and the software (the programs stored within the computer).

A given computer capability can be provided either by hardware alone or by a combination of hardware and software. The choice of a given mixture of hardware and software depends on factors such as cost, speed, ease of maintenance, and flexibility.

There are three nominal levels of programming language: machine language, assembler language, and compiler language.

Machine Language.

In the machine – language programming level, the programmer writes the program exactly as stored in the computer. Very little programming is done at this level as it is extremely tedious, and when errors are found it is hard to correct them.

The machine language – language level is useful in the initial operation of a computer when no other techniques are available, in repair of a faulty computer, and in the debugging of programs when other techniques fail and the program must be examined at the machine – language level.







©2015 arhivinfo.ru Все права принадлежат авторам размещенных материалов.