Dark Mode
Image

COA_Misc

Structured Computer Organization

A digital computer is a machine that can solve problems for people by carrying out instructions given to it. A computer's primitive instructions form a language in which people can communicate with the computer. This language is called machine language.

When we entered the era of designing computers, people faced a big problem: there was a large gap between what is convenient for people and what is convenient for computers. This problem leads to structuring the computer as a series of abstractions, each abstraction building on the one below it.

By this approach, the complexity can control, and the computer system can be designed systematically and organized. This approach is called Structured Computer Organization.

They try to make the primitive instructions as simple as possible in its machine language that is reliable with the computer's use and performance requirements to reduce the complexity and cost of the electronics needed.

For example, people want to do X tasks, but computers can only do Y tasks. This leads to a problem for people, and that's why people decide to design a new computer known as a structured computer organization.

Ways to Solve this Problem

The problem can solve in two ways. Both the solutions involve designing a new set of instructions that is more convenient for people to use built-in machine instructions.

Let suppose there are two languages, L0 (machine language) and L1 (machine language that is non-understandable by machine). Now we have two methods by which L1 can also execute on the machine.

1st Method: Execute a program written in L1 and replace each instruction with an equivalent sequence of instructions in L0. Now the resulting program consists of L0 instructions completely. Then the computer executes the new L0 program instead of the old L1 program. This technique is called translation.

Structured Computer Organization

Structured Computer Organization

2nd Method: In this method, write a program in L0 that takes programs in L1 as input data and carries them out by examining each instruction in turn and directly executes the equivalent sequence of L0 instructions. It does not require generating a new program in L0. This technique is called interpretation, and the program that carries it out is called an interpreter.

Structured Computer Organization

Structured Computer Organization

Translation and interpretation are similar. In both methods, the computer carries out instructions in L1 by executing equivalent sequences of instructions in L0. The main difference is that, in translation, the entire L1 program is first converted to an L0 program, and the L1 program is thrown away, then the new L0 program is loaded into the computer's memory. During execution, the newly generated L0 program is running in control of the computer.

In interpretation, after each L1 instruction is examined and decoded, it is carried out immediately. No translated program is generated. Here, the interpreter is in control of the computer, and the L1 program is just data. Both methods and the combination of both methods are widely used.

Multilevel Machines

Rather than thinking in terms of translation or interpretation, we imagine a hypothetical computer or virtual machine whose machine language is L1. Let's call the virtual machine M1 and the virtual machine corresponding to L0, M0.

People could simply write their programs in L1 and computer execute them directly. Even if the virtual machine whose language is L1 is too expensive or complicated to construct out of electronic circuits, people can still write programs for it. These programs can either be interpreted or translated by a program written in L0.

Structured Computer Organization

Structured Computer Organization

  • To perform translation or interpretation, the languages L0 and L1 must not be too different. This constraint means that L1 is better than L0 but still far from ideal for most applications. This result is maybe disappointing in comparison to the original purpose for creating L1.
  • Now, we invent another set of instructions that is more people-oriented and less machine-oriented than L1. This third set also forms a language, which we will call L2 with virtual machine M2. People can write programs in L2. these programs can either be translated to L1 or executed by an interpreter written in L1.
  • In the whole series of languages, each one is more convenient than its predecessors. And it continues until a suitable one is found. Each language uses its predecessor as a basis, so we may view a computer using this technique as a series of layers or levels, one on top of another, as shown in the above image. The bottommost language or level is the simplest, and the topmost language or level is the most complicated.

In a certain case, a computer with n levels can be regarded as n different virtual machines, each with a different machine language. The electronic circuits can directly carry only programs written in language L0 without translation or interpretation. Programs are written in L1, L2, ..., Ln must either be interpreted by an interpreter running on a lower level or translated to another language corresponding to a lower level.

Contemporary Multilevel Machines

Six levels exist in contemporary multilevel machines, as shown in the below image. Level 0, at the bottom, is the machine's true hardware, and its circuits carry out the machine-language programs of level 1.

Structured Computer Organization

Structured Computer Organization

  1. Digital logic level: It is built from analogue components, such as gates and transistors. Each gate has one or more digital inputs and computes some simple function of these inputs, such as AND or OR. Each gate is built up from, at most, one transistor.
    A small number of gates is combined to form a 1-bit memory, stored in 0 or 1. The 1-bit memories are combined in groups of 16, 32, or 64 to form registers. Each register can hold a single binary number up to some maximum. Gates can also be combined to form the main computing engine itself.
  2. Microarchitecture level: It has a collection of 8 to 32 registers that form a local memory and a circuit called an ALU (Arithmetic Logic Unit), which can perform simple arithmetic operations. The registers are connected to the ALU to form a data path over which the data flow. The basic operation of the data path consists of selecting one or two registers, having the ALU operate on them, and storing the result stored back in some register.
    On some machines, the operation of the data path is controlled by a program called a microprogram. On other machines, the data path is controlled directly by hardware. On machines with software control of the data path, the microprogram is an interpreter for the instructions at level 2. It fetches, examines, and executes instructions one by one, using the data path to do so.
  3. Instruction Set Architecture (ISA) level: If a computer manufacturer provides two interpreters for one of its machines and interprets two different ISA levels, it will need to provide two machine language reference manuals, one for each interpreter.
  4. Operating system machine level: This level is usually a hybrid level, and most of the instructions in its language are also at the ISA level. There are also new instructions, a different memory organization, run two or more programs concurrently, and various other features. The operating system interprets some of the level 3 instructions, and some are interpreted directly by the microprogram.
  5. Assembly language level: This level allows people to write programs for levels 1, 2, and 3 in a form that is not as unpleasant as the virtual machine languages themselves. Programs in assembly language are first translated to level 1, 2, or 3 languages then interpreted by the appropriate virtual or actual machine. The program that performs the translation is called an assembler.
  6. Problem-oriented language level: It consists of languages designed by applications programmers to solve problems. Such languages are often called high-level languages, and programs written in these languages are generally translated to level 3 or level 4 by translators known as compilers.
    In some cases, level 5 consists of an interpreter for a specific application domain, such as symbolic mathematics. It provides data and operations for solving problems in this domain so that people can understand easily.

Comment / Reply From