- •I. What is a computer?
- •II. Glimpses of history development of the transistor
- •The transistor and the computer. The computer's miniaturization
- •Planar technology
- •Integrated microcircuits come in
- •Microelectronics makes rapid progress
- •Birth of the microprocessor
- •Speedier semiconductor chips
- •III. The computer principles, structure and operation binary system
- •Logic circuits
- •Microelectronic memories
- •Using the computer
- •Data structures
- •Input. Process. Store, output
- •Output — video and printing devices
- •Video Terminals
- •IV. The computer's software programming a computer
- •Programming languages
- •Program development
- •Input Requirements
- •Table 5. Program Containing an Error
- •VI. Microcomputers in industry. Robotics machine tools5
- •Process control
- •Inspection and measurement
- •Robotics
- •The robot's nervous system
- •Robots in industry
- •VI. Educational applications of microelectronics computers on wheels
- •The computer teaches painting
- •A talking abc-book
- •VII. Computers all around us
- •Viewdata6
- •Integrated work station3
- •Multiple-fare meter2
- •Shade for the eyes. Music for the ears
- •Computer in a wristwatch
- •Talking watch
- •The doll talks
- •Pocket-size lie detector
- •Electronic watchman
- •Shock treatment2 for thieves
- •Passport for the electronic age
- •Illustrated copying instructions
- •Plain-speaking home robot
- •Touchy calculator
- •Optical discs: thanks for the memory
- •VIII. Computers at their best data base management systems'
- •Computer languages
- •The computer acquires intelligence
- •5 Whose syntax and structure lend themselves to interactive use — синтаксис и
- •Translation by computer
- •Enter the intelligent computer
- •Computers with intelligence
- •"Aesculapius"2 diagnoses the case
- •A smarter way to fly
- •Computer-controlled irrigation
IV. The computer's software programming a computer
Each family of processors has its own instruction set which is likely to differ from' that of other processors. This means that a particular processor is only capable of understanding its own set of instructions in binary code.
The computer's memory can be considered as consisting of a number of cells capable of storing binary patterns representing program instructions or data. Each of these cells is uniquely numbered so that reference can be made to particular memory cells, either to select a program instruction or data, or to write data into a certain memory cell.
As an example of how programs are written in a computer's own code (machine code), it will be assumed that2 two numbers are held in memory cells 5 and 6, that these are to be added together, and the result stored in memory cell 8. The addition will be performed in a storage location called the accumulator, so the first instruction needs to load one of the numbers into the accumulator. The second instruction adds the other number to the number in the accumulator, which will then contain the sum of the two numbers. The third instruction stores the contents of the accumulator in the required memory cell.
The binary codes for these instructions for a typical processor are shown in Table 4.
is likely to differ from — чаще всего отличается от it will be assumed that — предположим, что
In one program run, memory cells 5 and 6 could have been set to 70 and 25, respectively- After the three instructioas in Table 5 have been obeyed, cells 5 and 6 would still contain 7,6 and 25 and cell 8 would now contain 70 + 25, i. e. 95. The same program could be run again2 with different data in cells 5 and 6 (?ay, 43 and 12), which would result in cell 8 having its previous value of 95 replaced by the new value of 55.
Programming languages
Programming in the computer's own machine code requires that the instructions and data are given to it in binary. Writing down and keying in a series of Is and Os is time-consuming and prone to error. An alternative way of expressing the instructions is to use mnemonic codes. For example, the command to load a number from memory cells could be writteh as LD A, (5) instead of the binary equivalent. Also the memory cells could be given symbolic names instead of referring to them by their actual numeric (binary) addresses.
This type of programming language is used when it is necessary to have close control over the functions of the computer. Languages which use such mnemonic codes are known as assembly languages. Each assembly language instruction usually corresponds to an equivalent machine code instruction. The translation of the assembly language program into machine code is carried out by a machine code program called an assembler.
High-level languages have been devised which allow several machine code instructions to be expressed in one statement. BASIC is such a programming language, as shown in the example below:
LET С == A + В
is a BASIC statement which causes the two numbers, held in memory cells A and B, to be added together and the sum stored in memory cell C. This is the same problem which previously required several machine code or assembly language instructions.
However, neither assembly language nor3 BASIC programs can be understood directly by the computer. BASIC programs need to be translated into machine code using a compiler or interpreter. The basic difference between these two is the stage -at which the translation from BASIC into machine code is performed.
' In one program run, memory cells 5 and 6 could have been set to 70 and 2.^,
respectively,— Пусть по ходу программы п. ячейки памяти 5 и ti ^.'шжеии
соо'п“'тетпен“<| символы 70 и 25. г could be run again - может быть запущена вновь •' neither... nor - ни,... ни
4G
Usi^g a compiler, the translation is done before the program is executed; this gives speed advantages' over an interpreter whicni performs the translation process as it executes the program. \