In order to understand Computer organization and architecture, a knowledge of the Binary system of counting is essential. If you need a refresher course in Binary, click below. Otherwise continue.
The basic components of a computer are processors, memories, and input/output equipment.
Languages, levels, and virtual machines
The only language the computer understands is the Machine Language. It is primitive language which is simple for the computer but difficult and tedious for the people who communicate with the computer. One solution to this problem is structuring computers as a series of abstractions, each abstraction building on the one below it.
So we have to design a new set of instructions that is convenient for people to use. If we call the machine language L0, then these instructions constitute a new language which could be called L1. Since the computer can only execute instructions in L0, we have to devise a method that will enable the computer to understand and execute L1. There are two ways to do it: translation and interpretation.
Translation. Each instruction in L1 is replaced by an equivalent instruction in L0. Now this program consists entirely of instructions and Lo and can be executed by the computer. The entire L1 program is converted into a L0 program, L1 is discarded, and L0 is loaded into computer's memory and executed.
Interpretation. L0 takes L1 as input data, examines each instruction and executes the equivalent sequence of L0 instructions. L0 is not generated. It requires the services of an interpreter. Each L1 instruction is examined, decoded, and executed.
One way of analyzing it is to imagine a hypothetical computer or a virtual machine whose machine language happens to be L1. If this was practical, we would not need interpreters or translators.
To facilitate translation and interpretation, L0 and L1 must not be too different. Then L1 will also be complicated for people to understand. So we can add a new layer of instructions L2 which will first be translated or interpreted into L1 and so on. We can have a series of levels or layers each using its predecessor as a basis.
A digital computer consists of an interconnected system of processors, memories, and input/output devices. For more details, click below.
Memory is that part of the computer where programs and data are stored. Stored-program digital computers use memory from which processors can read and write information. For more information, click below.
Machines can have as many as six levels. The lowest level is called the device level. These are transistors and explained by solid-state physics. At the digital logic level, we have objects called gates, composed of transistors. Each gate has one or more digital inputs (signals representing 0 or 1) and computes as outputs some function such as AND or OR. They can be used as registers, or combined for memory. For more information, click on the table below.
The next level is the microarchitecture level. This is a collection of 8 to 32 registers for memory and ALU (Arithmetic Logic Unit) to perform arithmetic and logic operations. The registers are connected to the ALU to form a data path, over which the data flow. The operation of the data path may be controlled by a microprogram, directly by hardware, or even by software, in which case the microprogram is the interpreter for instructions at the next level.
This level is called the Instruction set level (ISA level). This is a machine language.
The next level is the operating system machine level.
The next level is the Assembly level language. Programs in assembly language need to be translated into one of the lower level languages.
The final level is the problem-oriented language level. These are high-level languages such as BASIC, Pascal, FORTRAN, COBOL, C++, Java, etc. They are translated into lower level languages by compilers. Figure below explains these six levels.
Level
5 Problem oriented language level
|
| Translation (compiler)
|
Level 4
Assembly language level
|
| Translation (assembler)
|
Level
3 Operating system machine language
|
| Partial interpretation (operating system)
|
Level 2 Instruction set architecture
level
|
| Interpretation (microprogram) or direct execution
|
Level
1 Microarchitecture
level
|
| Hardware
|
Level
0
Digital logic level
For more details of these levels
click
in the appropriate place in the table below.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Problems: Page 38, Nos. 5 and 6
Solutions:
No. 5. You lose a factor on n at each level, so instruction execution times at levels 2, 3, and 4 are kn, kn2, and kn3, respectively.
No. 6. Each level of interpretation slows down the
machine by a factor of n/m. Thus the execution times for levels 2,
3, and 4 are kn/m, kn2/m2, and kn3/m3,
respectively.
|
|
|
|
|
|
|